mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-06 02:52:55 +01:00
fix: survive if referent is null (enum)
This commit is contained in:
parent
7558505d49
commit
5f7630e325
@ -17,6 +17,7 @@
|
|||||||
package brut.androlib.res.data.value;
|
package brut.androlib.res.data.value;
|
||||||
|
|
||||||
import brut.androlib.AndrolibException;
|
import brut.androlib.AndrolibException;
|
||||||
|
import brut.androlib.res.data.ResResSpec;
|
||||||
import brut.androlib.res.data.ResResource;
|
import brut.androlib.res.data.ResResource;
|
||||||
import brut.util.Duo;
|
import brut.util.Duo;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -51,9 +52,12 @@ public class ResEnumAttr extends ResAttr {
|
|||||||
throws AndrolibException, IOException {
|
throws AndrolibException, IOException {
|
||||||
for (Duo<ResReferenceValue, ResIntValue> duo : mItems) {
|
for (Duo<ResReferenceValue, ResIntValue> duo : mItems) {
|
||||||
int intVal = duo.m2.getValue();
|
int intVal = duo.m2.getValue();
|
||||||
|
ResResSpec m1Referent = duo.m1.getReferent();
|
||||||
|
|
||||||
serializer.startTag(null, "enum");
|
serializer.startTag(null, "enum");
|
||||||
serializer.attribute(null, "name", duo.m1.getReferent().getName());
|
serializer.attribute(null, "name",
|
||||||
|
m1Referent != null ? m1Referent.getName() : "@null"
|
||||||
|
);
|
||||||
serializer.attribute(null, "value", String.valueOf(intVal));
|
serializer.attribute(null, "value", String.valueOf(intVal));
|
||||||
serializer.endTag(null, "enum");
|
serializer.endTag(null, "enum");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user