[Jrisk-cvs] SF.net SVN: jrisk:[591] Domination/src_swing/net/yura/domination/tools/ mapeditor/MapEd
Brought to you by:
yuranet
From: <yu...@us...> - 2011-11-29 18:00:36
|
Revision: 591 http://jrisk.svn.sourceforge.net/jrisk/?rev=591&view=rev Author: yuranet Date: 2011-11-29 18:00:27 +0000 (Tue, 29 Nov 2011) Log Message: ----------- null fix Modified Paths: -------------- Domination/src_swing/net/yura/domination/tools/mapeditor/MapEditor.java Modified: Domination/src_swing/net/yura/domination/tools/mapeditor/MapEditor.java =================================================================== --- Domination/src_swing/net/yura/domination/tools/mapeditor/MapEditor.java 2011-11-25 12:50:58 UTC (rev 590) +++ Domination/src_swing/net/yura/domination/tools/mapeditor/MapEditor.java 2011-11-29 18:00:27 UTC (rev 591) @@ -778,8 +778,16 @@ if (returnVal == JFileChooser.APPROVE_OPTION) { - return makeRGBImage(ImageIO.read( fc.getSelectedFile() )); + File newFile = fc.getSelectedFile(); + + BufferedImage img = ImageIO.read( newFile ); + + if (img!=null) { + return makeRGBImage(img); + } + JOptionPane.showMessageDialog(this,"no registered ImageReader claims to be able to read this file: "+newFile); + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |