aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse
diff options
context:
space:
mode:
authorRaphael Moll <ralf@android.com>2012-04-26 22:24:12 -0700
committerRaphael Moll <ralf@android.com>2012-04-27 10:18:53 -0700
commite80daeac85a815b60abd950217072c21eab3d2a9 (patch)
tree93e805150f42fb5b727ad341a4e51f9594449f21 /eclipse
parent6cdb3a6f94ff87f79a2bd57870ad4cf4dbf16a20 (diff)
downloadsdk-e80daeac85a815b60abd950217072c21eab3d2a9.zip
sdk-e80daeac85a815b60abd950217072c21eab3d2a9.tar.gz
sdk-e80daeac85a815b60abd950217072c21eab3d2a9.tar.bz2
Prevent ADT NPE when project has no project.prop file.
There's an internal NPE when initializing the library classpath container if a project has neither a default.properties or a project.properties. See SDK Bug: 29632 for details. Change-Id: I5e3fda0b84beaf47d59fb102439695a32491e5f8
Diffstat (limited to 'eclipse')
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/LibraryClasspathContainerInitializer.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/LibraryClasspathContainerInitializer.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/LibraryClasspathContainerInitializer.java
index ef47494..5d38bf1 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/LibraryClasspathContainerInitializer.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/LibraryClasspathContainerInitializer.java
@@ -172,6 +172,10 @@ public class LibraryClasspathContainerInitializer extends BaseClasspathContainer
// check if the project has a valid target.
ProjectState state = Sdk.getProjectState(iProject);
+ if (state == null) {
+ // getProjectState should already have logged an error. Just bail out.
+ return null;
+ }
/*
* At this point we're going to gather a list of all that need to go in the