[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] ImageIcon fix
From: |
Thomas Fitzsimmons |
Subject: |
[cp-patches] ImageIcon fix |
Date: |
Sun, 21 Aug 2005 14:25:07 -0400 |
Hi,
I committed this patch suggested by Timo Lindfors. It fixes
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22616
Tom
2005-08-21 Thomas Fitzsimmons <address@hidden>
* javax/swing/ImageIcon.java (getIconHeight): Return -1 if image
is null.
(getIconWidth): Likewise.
Index: javax/swing/ImageIcon.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/ImageIcon.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- javax/swing/ImageIcon.java 27 Jul 2005 12:41:33 -0000 1.18
+++ javax/swing/ImageIcon.java 21 Aug 2005 18:20:07 -0000 1.19
@@ -302,11 +302,19 @@
public int getIconHeight()
{
+ // Sun returns -1 if the image is not loaded.
+ if (image == null)
+ return -1;
+
return image.getHeight(observer);
}
public int getIconWidth()
{
+ // Sun returns -1 if the image is not loaded.
+ if (image == null)
+ return -1;
+
return image.getWidth(observer);
}
- [cp-patches] ImageIcon fix,
Thomas Fitzsimmons <=