Author: koen.aers(a)jboss.com
Date: 2012-01-13 06:51:51 -0500 (Fri, 13 Jan 2012)
New Revision: 37820
Modified:
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/part/ForgeView.java
Log:
JBIDE-10270: Fixed NPE
Modified:
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/part/ForgeView.java
===================================================================
---
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/part/ForgeView.java 2012-01-13
11:07:05 UTC (rev 37819)
+++
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/part/ForgeView.java 2012-01-13
11:51:51 UTC (rev 37820)
@@ -280,7 +280,9 @@
goToPath(((IResource)first).getLocation().toOSString());
} else if (first instanceof IJavaElement) {
try {
- goToPath(((IJavaElement)first).getCorrespondingResource().getLocation().toOSString());
+ IResource resource = ((IJavaElement)first).getCorrespondingResource();
+ if (resource == null) return false;
+ goToPath(resource.getLocation().toOSString());
} catch (JavaModelException e) {
ForgeUIPlugin.log(e);
return false;
Show replies by date