diff --git a/baksmali/src/main/java/org/jf/baksmali/Adaptors/Format/InstructionMethodItem.java b/baksmali/src/main/java/org/jf/baksmali/Adaptors/Format/InstructionMethodItem.java index fd2cf4b6..e0a969cc 100644 --- a/baksmali/src/main/java/org/jf/baksmali/Adaptors/Format/InstructionMethodItem.java +++ b/baksmali/src/main/java/org/jf/baksmali/Adaptors/Format/InstructionMethodItem.java @@ -346,9 +346,10 @@ public class InstructionMethodItem extends MethodItem { protected void writeResourceId(IndentingWriter writer, int val) throws IOException { Map resourceIds = methodDef.classDef.options.resourceIds; - if (resourceIds.containsKey(Integer.valueOf(val))) { + String resource = resourceIds.get(Integer.valueOf(val)); + if (resource != null) { writer.write(" # "); - writer.write(resourceIds.get(Integer.valueOf(val))); + writer.write(resource); } }