mirror of https://github.com/axmolengine/axmol.git
Merge pull request #4019 from superrad/patch-1
Clear NoSuchMethodError Exception when JniHelper fails to find methodID
This commit is contained in:
commit
6d5f7beda7
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue