bug fix: Some NullPointerExceptions

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@800 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent 54c64e5d3f
commit 9aecb77820
  1. 6
      jode/jode/obfuscator/LocalOptimizer.java

@ -707,7 +707,7 @@ public class LocalOptimizer implements Opcodes {
} }
} }
if (instr.opcode == opc_ret) { if (info.jsrTargetInfo != null) {
/* On a ret we do a special merge */ /* On a ret we do a special merge */
Instruction jsrTargetInstr = info.jsrTargetInfo.instr; Instruction jsrTargetInstr = info.jsrTargetInfo.instr;
@ -749,6 +749,7 @@ public class LocalOptimizer implements Opcodes {
: null; : null;
if (lcl != currentLocal[i] if (lcl != currentLocal[i]
&& (lcl == null || currentLocal[i] == null && (lcl == null || currentLocal[i] == null
|| lcl.name == null || lcl.type == null
|| !lcl.name.equals(currentLocal[i].name) || !lcl.name.equals(currentLocal[i].name)
|| !lcl.type.equals(currentLocal[i].type))) { || !lcl.type.equals(currentLocal[i].type))) {
if (lvi[i] != null) { if (lvi[i] != null) {
@ -757,7 +758,8 @@ public class LocalOptimizer implements Opcodes {
lvi[i] = null; lvi[i] = null;
currentLocal[i] = lcl; currentLocal[i] = lcl;
if (currentLocal[i] != null if (currentLocal[i] != null
&& currentLocal[i].name != null) { && currentLocal[i].name != null
&& currentLocal[i].type != null) {
lvi[i] = new LocalVariableInfo(); lvi[i] = new LocalVariableInfo();
lvtEntries.addElement(lvi[i]); lvtEntries.addElement(lvi[i]);
lvi[i].name = currentLocal[i].name; lvi[i].name = currentLocal[i].name;

Loading…
Cancel
Save