Skip to content

Commit

Permalink
Avoid errors during onProjectStatusChanged, as the OMT menus could
Browse files Browse the repository at this point in the history
sometime not be present.
  • Loading branch information
briacp committed Apr 15, 2019
1 parent 32de816 commit 61ae760
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## [v1.0.5]

- Avoid errors during `onProjectStatusChanged`, as the OMT menus could sometime not be present.

## [v1.0.4]

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,12 @@ public static void unloadPlugins() {
}

private static void onProjectStatusChanged(boolean isProjectLoaded) {
exportOMT.setEnabled(isProjectLoaded);
importOMT.setEnabled(!isProjectLoaded);
if (exportOMT != null) {
exportOMT.setEnabled(isProjectLoaded);
}
if (importOMT != null) {
importOMT.setEnabled(!isProjectLoaded);
}
}

public static void projectImportOMT() {
Expand Down

0 comments on commit 61ae760

Please sign in to comment.