[Bug SWING/16280] Swing application fails with Graphics2D enabled
roman at ontographics dot com
gcc-bugzilla@gcc.gnu.org
Tue Jun 29 20:53:00 GMT 2004
------- Additional Comments From roman at ontographics dot com 2004-06-29 20:52 -------
this additional check makes it work:
Index: javax/swing/ImageIcon.java
===================================================================
RCS file: /cvsroot/gcc/gcc/libjava/javax/swing/ImageIcon.java,v
retrieving revision 1.2.18.8
diff -u -r1.2.18.8 ImageIcon.java
--- javax/swing/ImageIcon.java 29 Jun 2004 09:59:11 -0000 1.2.18.8
+++ javax/swing/ImageIcon.java 29 Jun 2004 20:48:35 -0000
@@ -95,7 +95,10 @@
public ImageIcon(Image image, String description)
{
- this.image = Toolkit.getDefaultToolkit().createImage(image.getSource());
+ if (image != null)
+ this.image = Toolkit.getDefaultToolkit().createImage(image.getSource());
+ else
+ this.image = null;
this.description = description;
}
Regards, Roman
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16280
More information about the Gcc-bugs
mailing list