diff options
author | Xavier Ducrohet <xav@google.com> | 2010-01-21 09:50:51 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-01-21 09:50:51 -0800 |
commit | 32cfca5838558c0beb9b771e3b2e880047eb8053 (patch) | |
tree | ff4796dc2ca650067671911774294711d2f5fe12 | |
parent | fe14931d3c5c50a57d7cb705dfc57f919972fce6 (diff) | |
parent | 52dcefe9060e6049e6ea0a300eeb0f61e6643340 (diff) | |
download | sdk-32cfca5838558c0beb9b771e3b2e880047eb8053.zip sdk-32cfca5838558c0beb9b771e3b2e880047eb8053.tar.gz sdk-32cfca5838558c0beb9b771e3b2e880047eb8053.tar.bz2 |
Merge "ADT: fix potential NPE when launching app." into eclair
-rw-r--r-- | eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/AndroidLaunchController.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/AndroidLaunchController.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/AndroidLaunchController.java index 38d2397..16dad90 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/AndroidLaunchController.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/AndroidLaunchController.java @@ -401,7 +401,10 @@ public final class AndroidLaunchController implements IDebugBridgeChangeListener if (projectTarget.isPlatform()) { // means this can run on any device as long // as api level is high enough AndroidVersion deviceVersion = Sdk.getDeviceVersion(d); - if (deviceVersion.canRun(projectTarget.getVersion())) { + // the deviceVersion may be null if it wasn't yet queried (device just + // plugged in or emulator just booting up. + if (deviceVersion != null && + deviceVersion.canRun(projectTarget.getVersion())) { // device is compatible with project compatibleRunningAvds.put(d, null); continue; |