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);
|
jmethodID methodID = pEnv->GetMethodID(classID, methodName, paramCode);
|
||||||
if (! methodID) {
|
if (! methodID) {
|
||||||
LOGD("Failed to find method id of %s", methodName);
|
LOGD("Failed to find method id of %s", methodName);
|
||||||
|
pEnv->ExceptionClear();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -247,6 +248,7 @@ namespace cocos2d {
|
||||||
jmethodID methodID = pEnv->GetMethodID(classID, methodName, paramCode);
|
jmethodID methodID = pEnv->GetMethodID(classID, methodName, paramCode);
|
||||||
if (! methodID) {
|
if (! methodID) {
|
||||||
LOGD("Failed to find method id of %s", methodName);
|
LOGD("Failed to find method id of %s", methodName);
|
||||||
|
pEnv->ExceptionClear();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue