diff options
author | Raphael <raphael@google.com> | 2011-10-18 13:53:32 -0700 |
---|---|---|
committer | Raphael <raphael@google.com> | 2011-10-18 13:53:32 -0700 |
commit | 5d658389def8f881c1a5f5d7e12bf3e39152ad8f (patch) | |
tree | a60917c7247e87d39bf25e2d7d46b2b2b1646aaf /sdkmanager/libs | |
parent | ab50ca676b038eb22957d3a10f532671f2a97838 (diff) | |
download | sdk-5d658389def8f881c1a5f5d7e12bf3e39152ad8f.zip sdk-5d658389def8f881c1a5f5d7e12bf3e39152ad8f.tar.gz sdk-5d658389def8f881c1a5f5d7e12bf3e39152ad8f.tar.bz2 |
Prevent NPE in 'android update project'.
SDK Bug 20535.
Doesn't seem reproducible, so just defend against
a potential NPE anyway.
Change-Id: Ieb6a0958c7585ea3c5cffbb640943263a14e4c60
Diffstat (limited to 'sdkmanager/libs')
-rw-r--r-- | sdkmanager/libs/sdklib/src/com/android/sdklib/internal/project/ProjectCreator.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/project/ProjectCreator.java b/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/project/ProjectCreator.java index feff5af..52c6008 100644 --- a/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/project/ProjectCreator.java +++ b/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/project/ProjectCreator.java @@ -535,6 +535,10 @@ public class ProjectCreator { while (true) { String propName = ProjectProperties.PROPERTY_LIB_REF + Integer.toString(index); assert props != null; + if (props == null) { + // This should not happen yet SDK bug 20535 says it can, not sure how. + break; + } String ref = props.getProperty(propName); if (ref == null) { break; |