Skip to content

Commit 2d8f02d

Browse files
committed
Fix
Task #89 - Error parsing file
1 parent 28b2657 commit 2d8f02d

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

src/main/java/org/netbeans/modules/python/indexing/PythonErrorAnnotator.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,16 @@ public void refresh(Set<URL> set) {
191191
toRefresh.add(URLMapper.findFileObject(t));
192192
});
193193

194-
fireFileStatusChanged(new FileStatusEvent(toRefresh.iterator().next()
195-
.getFileSystem(), toRefresh, true, false));
194+
if (toRefresh.iterator().hasNext()) {
195+
FileObject next = toRefresh.iterator().next();
196+
if (next == null) {
197+
return;
198+
}
199+
200+
fireFileStatusChanged(new FileStatusEvent(next
201+
.getFileSystem(), toRefresh, true, false));
202+
}
203+
196204
} catch (FileStateInvalidException ex) {
197205
Exceptions.printStackTrace(ex);
198206
}

0 commit comments

Comments
 (0)