Fix a NPE when looking up a non-existant method

git-svn-id: https://smali.googlecode.com/svn/trunk@732 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
JesusFreke@JesusFreke.com 2010-06-10 01:49:26 +00:00
parent 76f566a55b
commit 41265daa5a

View File

@ -116,6 +116,9 @@ public class DeodexUtil {
public MethodIdItem lookupVirtualMethod(ClassPath.ClassDef classDef, int methodIndex) { public MethodIdItem lookupVirtualMethod(ClassPath.ClassDef classDef, int methodIndex) {
String method = classDef.getVirtualMethod(methodIndex); String method = classDef.getVirtualMethod(methodIndex);
if (method == null) {
return null;
}
Matcher m = shortMethodPattern.matcher(method); Matcher m = shortMethodPattern.matcher(method);
if (!m.matches()) { if (!m.matches()) {