diff options
author | Siva Velusamy <vsiva@google.com> | 2013-01-29 17:18:22 -0800 |
---|---|---|
committer | Siva Velusamy <vsiva@google.com> | 2013-01-29 17:18:22 -0800 |
commit | 83dcbc78801da59f8bea4adf180183f409be489f (patch) | |
tree | 4b06ab1874c8b8658e6e5eadb94753a3e9f325a6 /eclipse/plugins | |
parent | c3b95c8cd3f8411e8e624b2dbd4243c537f18c20 (diff) | |
download | sdk-83dcbc78801da59f8bea4adf180183f409be489f.zip sdk-83dcbc78801da59f8bea4adf180183f409be489f.tar.gz sdk-83dcbc78801da59f8bea4adf180183f409be489f.tar.bz2 |
43194: Fix NPE when preferred avd is null
Change-Id: If80929f0cf90bbc15f8bb1b065450058f1fb2e96
Diffstat (limited to 'eclipse/plugins')
-rw-r--r-- | eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/AndroidLaunchController.java | 3 |
1 files changed, 3 insertions, 0 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 31d4d0f..4281f19 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 @@ -377,6 +377,9 @@ public final class AndroidLaunchController implements IDebugBridgeChangeListener AvdInfo preferredAvd = null; if (config.mAvdName != null) { preferredAvd = avdManager.getAvd(config.mAvdName, true /*validAvdOnly*/); + } + + if (preferredAvd != null) { IAndroidTarget preferredAvdTarget = preferredAvd.getTarget(); if (preferredAvdTarget != null && !preferredAvdTarget.getVersion().canRun(minApiVersion)) { |