Fix some null checking logic

git-svn-id: https://smali.googlecode.com/svn/trunk@454 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
JesusFreke@JesusFreke.com 2009-09-10 02:01:38 +00:00
parent cf4e7ce360
commit ddc8655d10

View File

@ -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;