mirror of https://github.com/axmolengine/axmol.git
Merge pull request #4298 from boyu0/fix_keypadtest_crash
[ci skip]fix keypad test crash bug
This commit is contained in:
commit
bbb579faad
|
@ -31,7 +31,11 @@ NS_CC_BEGIN
|
||||||
|
|
||||||
bool EventListenerKeyboard::checkAvailable()
|
bool EventListenerKeyboard::checkAvailable()
|
||||||
{
|
{
|
||||||
CCASSERT(onKeyPressed && onKeyReleased, "");
|
if (onKeyPressed == nullptr && onKeyReleased == nullptr)
|
||||||
|
{
|
||||||
|
CCASSERT(false, "Invalid EventListenerKeyboard!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue