This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug SWING/16280] Swing application fails with Graphics2D enabled


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]