SDK: fix NPE in AVD Manager > Start when skin.path is missing.

Change-Id: I0e42d3f110cfc4e313972f3021b7d2d84dfbd64d
This commit is contained in:
Raphael
2009-11-06 13:42:28 -08:00
parent 7f305ce770
commit ca4603db2f

View File

@@ -424,6 +424,7 @@ final class AvdStartDialog extends GridDialog {
mSize2 = Integer.parseInt(m.group(2));
mSkinDisplay = skinName;
mEnableScaling = true;
return;
}
}
@@ -431,7 +432,9 @@ final class AvdStartDialog extends GridDialog {
mEnableScaling = false; // default to false for now.
// path to the skin layout file.
File skinFolder = new File(mSdkLocation, prop.get(AvdManager.AVD_INI_SKIN_PATH));
String skinPath = prop.get(AvdManager.AVD_INI_SKIN_PATH);
if (skinPath != null) {
File skinFolder = new File(mSdkLocation, skinPath);
if (skinFolder.isDirectory()) {
File layoutFile = new File(skinFolder, "layout");
if (layoutFile.isFile()) {
@@ -444,6 +447,7 @@ final class AvdStartDialog extends GridDialog {
}
}
}
}
/**
* Parses a layout file.