mirror of https://github.com/axmolengine/axmol.git
fix keypad test crash bug
This commit is contained in:
parent
bac14ab3e5
commit
eea09d60f7
|
@ -31,7 +31,11 @@ NS_CC_BEGIN
|
|||
|
||||
bool EventListenerKeyboard::checkAvailable()
|
||||
{
|
||||
CCASSERT(onKeyPressed && onKeyReleased, "");
|
||||
if (onKeyPressed == nullptr && onKeyReleased == nullptr)
|
||||
{
|
||||
CCASSERT(false, "Invalid EventListenerKeyboard!");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue