Skip to content

Commit a02c96e

Browse files
committed
Fix NullPointerException in CompletionProvider #47
1 parent 04681a9 commit a02c96e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/org/cakephp/netbeans/editor/codecompletion/CakePhpCompletionProvider.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ public int getAutoQueryTypes(JTextComponent jtc, String string) {
8888
*/
8989
protected PhpModule getPhpModule(JTextComponent jtc) {
9090
FileObject fo = NbEditorUtilities.getFileObject(jtc.getDocument());
91+
if (fo == null) {
92+
return null;
93+
}
9194
return PhpModule.forFileObject(fo);
9295
}
9396
}

0 commit comments

Comments
 (0)