#1365431 (toshihiro) - PHP Editor crashes Windows with JavaScript 'windows.close()'
[phpeclipse.git] / net.sourceforge.phpeclipse.webbrowser / src / net / sourceforge / phpeclipse / webbrowser / internal / WebBrowser.java
index 4c4f9ee..961fd5d 100644 (file)
@@ -236,8 +236,10 @@ public class WebBrowser extends Composite {
                                // else its an editor window
                                if (shell != null)
                                        shell.dispose();
-                               else
-                                       editor.closeEditor();
+                               else {
+                                       // #1365431 (toshihiro) editor.closeEditor(); causes NPE
+                               if (editor != null) editor.closeEditor();
+                               }
                        }
                });