aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse
diff options
context:
space:
mode:
Diffstat (limited to 'eclipse')
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/EmulatorConfigTab.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/EmulatorConfigTab.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/EmulatorConfigTab.java
index 855a7fa..e01bfab 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/EmulatorConfigTab.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/EmulatorConfigTab.java
@@ -149,9 +149,17 @@ public class EmulatorConfigTab extends AbstractLaunchConfigurationTab {
public void createControl(Composite parent) {
Font font = parent.getFont();
- // reload the AVDs to make sure we are up to date
+ // Reload the AVDs to make sure we are up to date
try {
- Sdk.getCurrent().getAvdManager().reloadAvds(NullLogger.getLogger());
+ // SDK can be null if the user opens the dialog before ADT finished
+ // initializing the SDK itself. In this case just don't reload anything
+ // so there's nothing obsolete yet.
+ Sdk sdk = Sdk.getCurrent();
+ if (sdk != null) {
+ AvdManager avdMan = sdk.getAvdManager();
+ assert avdMan != null;
+ avdMan.reloadAvds(NullLogger.getLogger());
+ }
} catch (AndroidLocationException e1) {
// this happens if the AVD Manager failed to find the folder in which the AVDs are
// stored. There isn't much we can do at this point.