Merge pull request #4019 from superrad/patch-1

Clear NoSuchMethodError Exception when JniHelper fails to find methodID
This commit is contained in:
minggo 2013-10-28 18:02:47 -07:00
commit 6d5f7beda7
1 changed files with 2 additions and 0 deletions

View File

@ -213,6 +213,7 @@ namespace cocos2d {
jmethodID methodID = pEnv->GetMethodID(classID, methodName, paramCode);
if (! methodID) {
LOGD("Failed to find method id of %s", methodName);
pEnv->ExceptionClear();
return false;
}
@ -247,6 +248,7 @@ namespace cocos2d {
jmethodID methodID = pEnv->GetMethodID(classID, methodName, paramCode);
if (! methodID) {
LOGD("Failed to find method id of %s", methodName);
pEnv->ExceptionClear();
return false;
}