This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug SWING/16280] Swing application fails with Graphics2D enabled
- From: "roman at ontographics dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Jun 2004 20:52:38 -0000
- Subject: [Bug SWING/16280] Swing application fails with Graphics2D enabled
- References: <20040629202604.16280.roman@ontographics.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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