mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-21 01:07:34 +01:00
fix: prevent NPE when key-element is null
This commit is contained in:
parent
f1357109aa
commit
6c17e1a14f
@ -888,6 +888,13 @@ public class MXSerializer implements XmlSerializer {
|
|||||||
|
|
||||||
protected void writeElementContent(String text, Writer out)
|
protected void writeElementContent(String text, Writer out)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
|
|
||||||
|
// For some reason, some non-empty, empty characters are surviving this far and getting filtered out
|
||||||
|
// So we are left with null, which causes an NPE
|
||||||
|
if (text == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// escape '<', '&', ']]>', <32 if necessary
|
// escape '<', '&', ']]>', <32 if necessary
|
||||||
int pos = 0;
|
int pos = 0;
|
||||||
for (int i = 0; i < text.length(); i++) {
|
for (int i = 0; i < text.length(); i++) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user