Bug 145139 - Added null guard
When no adapter of type StandbyPart is available on the platform,
standByPart will be null. Signal failure then.
Change-Id: Ib25b3e74c26e207c524cbb0a333029e06ed09d84
Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURL.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURL.java
index 7a008e2..3b21a98 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURL.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURL.java
@@ -237,13 +237,9 @@
StandbyPart standbyPart = introPart
.getAdapter(StandbyPart.class);
- boolean success = standbyPart.showContentPart(partId, input);
- if (success)
- return true;
-
- // we do not have a valid partId or we failed to instantiate part or
- // create the part content, empty part will be shown. Signal failure.
- return false;
+ // We may not have a valid partId or we might fail to instantiate part or
+ // create the part content. An empty part will be shown. Signal failure.
+ return standbyPart != null && standbyPart.showContentPart(partId, input);
}
/**