Fix null pointer

When I am decompiling an apk, I got this exception:
Exception in thread "main" java.lang.NullPointerException
        at brut.androlib.res.data.ResResSpec.<init>(ResResSpec.java:42)
This commit is contained in:
a-bahmani 2018-12-17 23:42:28 +03:30 committed by GitHub
parent 3cf5cb6f78
commit db553ebe8d
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;