From 8d6a63fed3e8e90ae0f0f8d3afc61a24f23a1629 Mon Sep 17 00:00:00 2001 From: peter Date: Sun, 27 Jun 2010 10:16:40 +0400 Subject: [PATCH] more NPE fixes --- .../src/com/intellij/psi/search/GlobalSearchScope.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/lang-api/src/com/intellij/psi/search/GlobalSearchScope.java b/platform/lang-api/src/com/intellij/psi/search/GlobalSearchScope.java index fee30d2568e2..f7e58dd5d385 100644 --- a/platform/lang-api/src/com/intellij/psi/search/GlobalSearchScope.java +++ b/platform/lang-api/src/com/intellij/psi/search/GlobalSearchScope.java @@ -263,7 +263,7 @@ public abstract class GlobalSearchScope extends SearchScope implements ProjectAw private final String myDisplayName; private IntersectionScope(@NotNull GlobalSearchScope scope1, @NotNull GlobalSearchScope scope2, String displayName) { - super(scope1.getProject()); + super(scope1.getProject() == null ? scope2.getProject() : scope1.getProject()); myScope1 = scope1; myScope2 = scope2; myDisplayName = displayName; @@ -316,7 +316,7 @@ public abstract class GlobalSearchScope extends SearchScope implements ProjectAw private final String myDisplayName; private UnionScope(@NotNull GlobalSearchScope scope1, @NotNull GlobalSearchScope scope2, String displayName) { - super(scope1.getProject() == scope2.getProject() ? scope1.getProject() : null); + super(scope1.getProject() == null ? scope2.getProject() : scope1.getProject()); myScope1 = scope1; myScope2 = scope2; myDisplayName = displayName;