fixes bug #13461 

2005-06-20  Lillian Angel  <[EMAIL PROTECTED]>

* javax/swing/DefaultDesktopManager
        (getBoundsForIconOf): No reason to check if desktopPane is null.
        Fixes bug #13461.

I can commit this if someone approves of it first.

Thanks!
Lillian.

Index: javax/swing/DefaultDesktopManager.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/DefaultDesktopManager.java,v
retrieving revision 1.10
diff -u -r1.10 DefaultDesktopManager.java
--- javax/swing/DefaultDesktopManager.java	20 Jun 2005 14:35:53 -0000	1.10
+++ javax/swing/DefaultDesktopManager.java	20 Jun 2005 20:02:02 -0000
@@ -516,14 +516,15 @@
     // the bottom left corner)
     // The icon also must not be placed where another icon is placed 
     // (regardless whether that frame is an icon currently or not)
-    JDesktopPane desktopPane = frame.getDesktopPane();
+	
+	if (desktopPane == null)
+	  return frame.getDesktopIcon().getBounds();
+	
+	JDesktopPane desktopPane = frame.getDesktopPane();
     Rectangle paneBounds = desktopPane.getBounds();
     Insets insets = desktopPane.getInsets();
     Dimension pref = frame.getDesktopIcon().getPreferredSize();
 
-    if (desktopPane == null)
-      return frame.getDesktopIcon().getBounds();
-
     Component[] frames = desktopPane.getComponents();
 
     int count = 0;
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to