fix NPE
[idea/community.git] / platform / lang-impl / src / com / intellij / find / impl / FindInProjectUtil.java
index 1b594abdc2b10ce5eb7e49108f75853417538319..14d7b9b9c5e5d6a04a840efa358c8408d68fcfab 100644 (file)
@@ -442,7 +442,7 @@ public class FindInProjectUtil {
 
   @Nullable
   private static GlobalSearchScope toGlobal(Project project, @Nullable SearchScope scope) {
-    if (scope instanceof GlobalSearchScope) {
+    if (scope instanceof GlobalSearchScope || scope == null) {
       return (GlobalSearchScope)scope;
     }
     Set<VirtualFile> files = new HashSet<VirtualFile>();