Check for already disposed.

This commit is contained in:
Kirill Likhodedov
2010-12-30 14:36:38 +03:00
parent 643e21678c
commit 2fc7bf1620
2 changed files with 2 additions and 0 deletions
@@ -131,6 +131,7 @@ public class IgnoredFileBean {
@Nullable
private VirtualFile doResolve() {
if (myProject == null || myProject.isDisposed()) { return null; }
VirtualFile baseDir = myProject.getBaseDir();
String path = FileUtil.toSystemIndependentName(myPath);
@@ -210,6 +210,7 @@ public class ChangesViewManager implements ChangesViewI, JDOMExternalizable, Pro
@Override
public void scheduleRefresh() {
if (ApplicationManager.getApplication().isHeadlessEnvironment()) return;
if (myProject == null || myProject.isDisposed()) { return; }
int was = myRepaintAlarm.cancelAllRequests();
if (LOG.isDebugEnabled()) {
LOG.debug("schedule refresh, was " + was);