Merge pull request #1959 from a-bahmani/patch-1

fix: prevent NPE when referencing a missing ResSpec
This commit is contained in:
Connor Tumbleson 2019-02-28 06:29:40 -05:00 committed by GitHub
commit c8d2a6a853
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,7 +39,7 @@ public class ResResSpec {
if (resResSpec != null) {
cleanName = name + "_APKTOOL_DUPLICATENAME_" + id.toString();
} else {
cleanName = (name.isEmpty() ? ("APKTOOL_DUMMYVAL_" + id.toString()) : name);
cleanName = ((name == null || name.isEmpty()) ? ("APKTOOL_DUMMYVAL_" + id.toString()) : name);
}
this.mName = cleanName;