Skip to content

Commit

Permalink
fixed null pointer exception
Browse files Browse the repository at this point in the history
  • Loading branch information
saharmehrpour committed Apr 18, 2019
1 parent c8b54be commit cbbd14b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/FileChangeManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ public void after(@NotNull List<? extends VFileEvent> events) {
connection.subscribe(FileEditorManagerListener.FILE_EDITOR_MANAGER, new FileEditorManagerListener() {
@Override
public void selectionChanged(@NotNull FileEditorManagerEvent event) {
s.sendToAll(MessageProcessor.encodeData(new Object[]{"IDEA", "WEB", "SHOW_RULES_FOR_FILE", event.getManager().getSelectedFiles()[0].getPath()}).toString());
if(event.getManager().getSelectedFiles().length > 0)
s.sendToAll(MessageProcessor.encodeData(new Object[]{"IDEA", "WEB", "SHOW_RULES_FOR_FILE", event.getManager().getSelectedFiles()[0].getPath()}).toString());
}

});
Expand Down

0 comments on commit cbbd14b

Please sign in to comment.