[Pixelle-commit] SF.net SVN: pixelle:[242] trunk/pixelle/src/com/mebigfatguy/pixelle/dialogs /Pixe
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2009-02-18 06:19:49
|
Revision: 242
http://pixelle.svn.sourceforge.net/pixelle/?rev=242&view=rev
Author: dbrosius
Date: 2009-02-18 06:19:46 +0000 (Wed, 18 Feb 2009)
Log Message:
-----------
guard against cancel/null
Modified Paths:
--------------
trunk/pixelle/src/com/mebigfatguy/pixelle/dialogs/PixelleExpressionDialog.java
Modified: trunk/pixelle/src/com/mebigfatguy/pixelle/dialogs/PixelleExpressionDialog.java
===================================================================
--- trunk/pixelle/src/com/mebigfatguy/pixelle/dialogs/PixelleExpressionDialog.java 2009-02-18 06:17:27 UTC (rev 241)
+++ trunk/pixelle/src/com/mebigfatguy/pixelle/dialogs/PixelleExpressionDialog.java 2009-02-18 06:19:46 UTC (rev 242)
@@ -511,8 +511,10 @@
public void actionPerformed(ActionEvent ae) {
Set<JFrame> frames = FrameMgr.getInstance().getFrames();
PixelleFrame frame = (PixelleFrame)JOptionPane.showInputDialog(SourcePanel.this, PixelleBundle.getString(PixelleBundle.PICK_SOURCE_LABEL), PixelleBundle.getString(PixelleBundle.TITLE), JOptionPane.QUESTION_MESSAGE, null, frames.toArray(new JFrame[frames.size()]), null);
- int id = sourceTable.getRowCount();
- sourceModel.addRow(new Object[] { Integer.valueOf(id), frame.getTitle() });
+ if (frame != null) {
+ int id = sourceTable.getRowCount();
+ sourceModel.addRow(new Object[] { Integer.valueOf(id), frame.getTitle() });
+ }
}
});
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|