git4idea: IDEADEV-36928: fixed refershing files that might have become invalid while...
authorConstantine Plotnikov <Constantine.Plotnikov@jetbrains.com>
Fri, 22 May 2009 10:31:44 +0000 (14:31 +0400)
committerConstantine Plotnikov <Constantine.Plotnikov@jetbrains.com>
Fri, 22 May 2009 10:31:44 +0000 (14:31 +0400)
plugins/git4idea/src/git4idea/GitUtil.java

index 1f4cf2c35aa79bcff02b642d86233025d9654c11..944c103322cafbd4ff92342f9800375f50cb9226 100644 (file)
@@ -443,6 +443,9 @@ public class GitUtil {
   public static void refreshFiles(@NotNull final Project project, @NotNull final Collection<VirtualFile> affectedFiles) {
     final VcsDirtyScopeManager dirty = VcsDirtyScopeManager.getInstance(project);
     for (VirtualFile file : affectedFiles) {
+      if (!file.isValid()) {
+        continue;
+      }
       file.refresh(false, true);
       if (file.isDirectory()) {
         dirty.dirDirtyRecursively(file);