Skip to content

Commit

Permalink
Fix NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
markiewb committed Mar 22, 2016
1 parent dc02b21 commit fcd8b5f
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ public String getCommandWithReplacedPlaceholders() {

private JTextComponent getCurrentEditor() {
Node[] arr = TopComponent.getRegistry().getCurrentNodes();
if (null == arr) {
return null;
}
for (int i = 0; i < arr.length; i++) {
EditorCookie ec = (EditorCookie) arr[i].getCookie(EditorCookie.class);
if (ec != null) {
Expand Down

0 comments on commit fcd8b5f

Please sign in to comment.