Skip to content

Commit 151f373

Browse files
committed
Merge pull request #174 from processing/sdkNullFix
fixed sdk npe in getSearchPath()
2 parents f20506e + c00cf3c commit 151f373

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/processing/mode/android/AndroidMode.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,15 @@ public AndroidSDK getSDK() {
159159

160160
@Override
161161
public String getSearchPath() {
162+
if (sdk == null) {
163+
checkSDK(null);
164+
}
165+
166+
if (sdk == null) {
167+
Messages.log("Android SDK path couldn't be loaded.");
168+
return "";
169+
}
170+
162171
String androidJarPath = sdk.getSdkFolder().getAbsolutePath() +
163172
File.separator + "platforms" + File.separator + "android-" +
164173
AndroidBuild.sdkVersion + File.separator + "android.jar";

0 commit comments

Comments
 (0)