Make sure mainContainer and owner are not null
[jalview.git] / src / jalview / appletgui / Tooltip.java
index 90f2e97..7de5193 100755 (executable)
@@ -137,6 +137,10 @@ public class Tooltip
 \r
   void setTipLocation(MouseEvent evt)\r
   {\r
+    if(mainContainer==null || owner==null)\r
+    {\r
+      return;\r
+    }\r
     setLocation( (owner.getLocationOnScreen().x\r
                   - mainContainer.getLocationOnScreen().x) + evt.getX(),\r
                 (owner.getLocationOnScreen().y -\r