Author: scooter
Date: 2011-07-27 13:49:53 -0700 (Wed, 27 Jul 2011)
New Revision: 26293

Modified:
   
cytoscape/trunk/application/src/main/java/cytoscape/view/cytopanels/CytoPanelImp.java
Log:
Avoid NPE when there aren't any more CytoPanels


Modified: 
cytoscape/trunk/application/src/main/java/cytoscape/view/cytopanels/CytoPanelImp.java
===================================================================
--- 
cytoscape/trunk/application/src/main/java/cytoscape/view/cytopanels/CytoPanelImp.java
       2011-07-27 20:27:54 UTC (rev 26292)
+++ 
cytoscape/trunk/application/src/main/java/cytoscape/view/cytopanels/CytoPanelImp.java
       2011-07-27 20:49:53 UTC (rev 26293)
@@ -985,7 +985,10 @@
                                         * 
                                         */
                                        Component panel = 
tabbedPane.getSelectedComponent();
-                                       
setMinimumSize(panel.getPreferredSize());
+                                       // Make sure we're not being notified 
that we've deleted
+                                       // the last panel
+                                       if (panel != null)
+                                               
setMinimumSize(panel.getPreferredSize());
                                
                                        int selectedIndex = 
tabbedPane.getSelectedIndex();
                                        
cytoPanelListener.onComponentSelected(selectedIndex);

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to