handle null caller in JVM_GetCallerClass

This commit is contained in:
Joel Dice 2011-03-25 18:54:09 -06:00
parent 7b4b43e119
commit 639ef50079

View File

@ -3223,8 +3223,10 @@ EXPORT(JVM_GetCallerClass)(Thread* t, int target)
{
ENTER(t, Thread::ActiveState);
return makeLocalReference
(t, getJClass(t, methodClass(t, getCaller(t, target))));
object method = getCaller(t, target);
return method ? makeLocalReference
(t, getJClass(t, methodClass(t, method))) : 0;
}
extern "C" JNIEXPORT jclass JNICALL