diff --git a/php/php.editor/src/org/netbeans/modules/php/editor/csl/OccurrencesFinderImpl.java b/php/php.editor/src/org/netbeans/modules/php/editor/csl/OccurrencesFinderImpl.java index 066d610920c0..1907f3794e33 100644 --- a/php/php.editor/src/org/netbeans/modules/php/editor/csl/OccurrencesFinderImpl.java +++ b/php/php.editor/src/org/netbeans/modules/php/editor/csl/OccurrencesFinderImpl.java @@ -69,7 +69,9 @@ public void setCaretPosition(int position) { @Override public Map getOccurrences() { // must not return null - return Collections.unmodifiableMap(range2Attribs); + return range2Attribs != null + ? Collections.unmodifiableMap(range2Attribs) + : Collections.emptyMap(); } @Override