From 2c80473aaf5b3a1a7892d95def37fe4098da8b35 Mon Sep 17 00:00:00 2001 From: Tumi Date: Tue, 24 Dec 2013 15:38:46 +0100 Subject: [PATCH] Fix a NullPointerException --- src/com/esotericsoftware/reflectasm/MethodAccess.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/com/esotericsoftware/reflectasm/MethodAccess.java b/src/com/esotericsoftware/reflectasm/MethodAccess.java index d0de66d..6a8b5f7 100644 --- a/src/com/esotericsoftware/reflectasm/MethodAccess.java +++ b/src/com/esotericsoftware/reflectasm/MethodAccess.java @@ -1,4 +1,3 @@ - package com.esotericsoftware.reflectasm; import java.lang.reflect.Method; @@ -27,7 +26,7 @@ public abstract class MethodAccess { /** Invokes the first method with the specified name and the specified number of arguments. */ public Object invoke (Object object, String methodName, Object... args) { - return invoke(object, getIndex(methodName, args.length), args); + return invoke(object, getIndex(methodName, args==null ? 0 : args.length), args); } /** Returns the index of the first method with the specified name. */