[jsword-svn] r1858 - trunk/common-swing/src/main/java/org/crosswire/common/swing

dmsmith at www.crosswire.org dmsmith at www.crosswire.org
Mon May 12 13:13:19 MST 2008


Author: dmsmith
Date: 2008-05-12 13:13:18 -0700 (Mon, 12 May 2008)
New Revision: 1858

Modified:
   trunk/common-swing/src/main/java/org/crosswire/common/swing/GuiUtil.java
Log:
fix an npe in GuiUtil.getWindow.

Modified: trunk/common-swing/src/main/java/org/crosswire/common/swing/GuiUtil.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/swing/GuiUtil.java	2008-05-12 16:10:29 UTC (rev 1857)
+++ trunk/common-swing/src/main/java/org/crosswire/common/swing/GuiUtil.java	2008-05-12 20:13:18 UTC (rev 1858)
@@ -96,12 +96,17 @@
     {
         Component temp = com;
 
+        if (temp == null)
+        {
+            return getRootFrame();
+        }
+
         while (!(temp instanceof Frame || temp instanceof Dialog))
         {
             temp = temp.getParent();
             if (temp == null)
             {
-                return getFrame(com);
+                return getRootFrame();
             }
         }
 




More information about the jsword-svn mailing list