Revision: 3680
Author: [email protected]
Date: Tue Jul  6 13:57:33 2010
Log: NPE fix. We cannot get the font if the play pen is null. The play pen is null when removing an object as the removal of the table pane sets the parent to null.
http://code.google.com/p/power-architect/source/detail?r=3680

Modified:
 /trunk/src/main/java/ca/sqlpower/architect/swingui/BasicTablePaneUI.java

=======================================
--- /trunk/src/main/java/ca/sqlpower/architect/swingui/BasicTablePaneUI.java Fri Jun 11 09:19:49 2010 +++ /trunk/src/main/java/ca/sqlpower/architect/swingui/BasicTablePaneUI.java Tue Jul 6 13:57:33 2010
@@ -524,7 +524,9 @@

     public Point getPointForModelObject(Object modelObject) {
         Point location = tablePane.getLocation();
- if (!tablePane.getItems().contains(modelObject) || tablePane.getFont() == null) {
+        if (!tablePane.getItems().contains(modelObject) ||
+                tablePane.getPlayPen() == null ||
+                tablePane.getFont() == null) {
             return location;
         }

Reply via email to