Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorelaskavaia2017-04-26 10:13:05 -0400
committerAlexander Kurtakov2017-05-05 05:37:58 -0400
commitf5e2860f38dba2a002ede84a70bc8dbe30334753 (patch)
tree7bc670e6eb077a21a045bcc42871a1abee6e6415
parent04f48101fa56b83d84d94cda97e8a73b58f232b5 (diff)
downloadrt.equinox.p2-f5e2860f38dba2a002ede84a70bc8dbe30334753.tar.gz
rt.equinox.p2-f5e2860f38dba2a002ede84a70bc8dbe30334753.tar.xz
rt.equinox.p2-f5e2860f38dba2a002ede84a70bc8dbe30334753.zip
Fixing NPE in QueryProvider
NPE occurs when its used in UI that shows something which is not profile specific such as list of repositories Change-Id: I8e7a964a938d87af1406be40a222a16ca1e23d3a Signed-off-by: elaskavaia <elaskavaia.cdt@gmail.com>
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryProvider.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryProvider.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryProvider.java
index e7e4706da..9f96758a5 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryProvider.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryProvider.java
@@ -54,6 +54,8 @@ public class QueryProvider {
* if the settings cannot be obtained.
*/
private static Map<String, String> getEnvFromProfile(IProfile profile) {
+ if (profile == null)
+ return null;
String environments = profile.getProperty(IProfile.PROP_ENVIRONMENTS);
if (environments == null)
return null;

Back to the top