Skip to content

Commit

Permalink
EditorFactoryImpl.releaseEditor must not be null - fixed #108
Browse files Browse the repository at this point in the history
  • Loading branch information
hsz committed Apr 16, 2015
1 parent 70de4af commit 2149b96
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/mobi/hsz/idea/gitignore/IgnoreManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public void childrenChanged(@NotNull PsiTreeChangeEvent event) {
* @param project current project
* @return {@link IgnoreManager instance}
*/
public static IgnoreManager getInstance(Project project) {
public static IgnoreManager getInstance(@NotNull final Project project) {
return project.getComponent(IgnoreManager.class);
}

Expand Down
4 changes: 3 additions & 1 deletion src/mobi/hsz/idea/gitignore/outer/OuterIgnoreWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ public JComponent getComponent() {

@Override
public void dispose() {
EditorFactory.getInstance().releaseEditor(outerEditor);
if (outerEditor != null) {
EditorFactory.getInstance().releaseEditor(outerEditor);
}
}
}

0 comments on commit 2149b96

Please sign in to comment.