diff options
author | Raphael <raphael@google.com> | 2010-03-29 14:20:11 -0700 |
---|---|---|
committer | Raphael <raphael@google.com> | 2010-03-29 14:20:11 -0700 |
commit | 1a240c89989766cd1b1fc56bf689df2576c0ad05 (patch) | |
tree | 9cb2e50f000bbb4cc6b5a8f2c7a985b0d9872218 /eclipse | |
parent | 58e510428f69a020487520e9d995dee5291b44be (diff) | |
download | sdk-1a240c89989766cd1b1fc56bf689df2576c0ad05.zip sdk-1a240c89989766cd1b1fc56bf689df2576c0ad05.tar.gz sdk-1a240c89989766cd1b1fc56bf689df2576c0ad05.tar.bz2 |
ADT: Fix NPE when opening a project-library.
Use case:
- start IDE with main project open and project library closed.
- open libray.
- NPE when main project refreshes.
Change-Id: I12a86587be6dc9c613897b6611322f7b1a3395df
Diffstat (limited to 'eclipse')
-rw-r--r-- | eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/ProjectState.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/ProjectState.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/ProjectState.java index 8c08baf..11cbc15 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/ProjectState.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/ProjectState.java @@ -371,7 +371,8 @@ public final class ProjectState { public LibraryState getLibrary(String name) { synchronized (mLibraries) { for (LibraryState state : mLibraries) { - if (state.getProjectState().getProject().getName().equals(name)) { + ProjectState ps = state.getProjectState(); + if (ps != null && ps.getProject().getName().equals(name)) { return state; } } |