fixed bug #9585.
authorwpaul
Mon, 10 Aug 2009 13:11:33 -0500
changeset 61 ff389f2cc4aa
parent 60 3982fab6369e
child 62 c400a1d2216a
child 63 d905e81b9a2e
fixed bug #9585.
cdt/cdt_6_0_x/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassWizardUtil.java
--- a/cdt/cdt_6_0_x/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassWizardUtil.java	Fri Aug 07 13:47:27 2009 -0500
+++ b/cdt/cdt_6_0_x/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassWizardUtil.java	Mon Aug 10 13:11:33 2009 -0500
@@ -346,10 +346,8 @@
      */
     public static boolean isTypeReachable(ITypeInfo type, ICProject project, String[] includePaths) {
         ICProject baseProject = type.getEnclosingProject();
-        if (baseProject == null)
-        	return false;
         
-        if (baseProject.equals(project)) {
+        if (baseProject != null && baseProject.equals(project)) {
             return true;
         }
         
@@ -359,8 +357,12 @@
         boolean isTypeLocation= true;
         if (location == null) {
         	isTypeLocation= false;
-            location = baseProject.getProject().getLocation();
-            if (location == null)
+        	
+        	if (baseProject != null) {
+                location = baseProject.getProject().getLocation();
+        	}
+
+        	if (location == null)
             	return false;
         }