From ddc8655d1007f81534bf1eac498ca8cb35533eea Mon Sep 17 00:00:00 2001 From: "JesusFreke@JesusFreke.com" Date: Thu, 10 Sep 2009 02:01:38 +0000 Subject: [PATCH] Fix some null checking logic git-svn-id: https://smali.googlecode.com/svn/trunk@454 55b6fa8a-2a1e-11de-a435-ffa8d773f76a --- dexlib/src/main/java/org/jf/dexlib/Util/DeodexUtil.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dexlib/src/main/java/org/jf/dexlib/Util/DeodexUtil.java b/dexlib/src/main/java/org/jf/dexlib/Util/DeodexUtil.java index 6b7250cd..fea02e1b 100644 --- a/dexlib/src/main/java/org/jf/dexlib/Util/DeodexUtil.java +++ b/dexlib/src/main/java/org/jf/dexlib/Util/DeodexUtil.java @@ -1369,7 +1369,7 @@ public class DeodexUtil { if (regType == RegisterType.Reference) { String regReferenceType = findCommonSuperclass(registerTypes[i], nextInsn.registerTypes[i]); - if (!regReferenceType.equals(nextInsn.registerTypes[i])) { + if (regReferenceType != null && !regReferenceType.equals(nextInsn.registerTypes[i])) { //see comment above for loop if (i == nextInsn.objectRegisterNum) { nextInsn.fixedInstruction = null; @@ -1401,8 +1401,7 @@ public class DeodexUtil { String type = destRegisterType(); String nextType = nextInsn.registerTypes[registerNum]; - if ((type == null && nextType == null) || - !type.equals(nextInsn.registerTypes[registerNum])) { + if (type != null && !type.equals(nextInsn.registerTypes[registerNum])) { //see comment above for loop if (registerNum == nextInsn.objectRegisterNum) { nextInsn.fixedInstruction = null;