Fix android server creation exit crash

This commit is contained in:
Benau 2019-06-17 11:32:08 +08:00
parent 7d1afc99fe
commit 2ff899e23e

View File

@ -1642,6 +1642,9 @@ bool CIrrDeviceAndroid::isGyroscopeAvailable()
bool CIrrDeviceAndroid::hasHardwareKeyboard() const bool CIrrDeviceAndroid::hasHardwareKeyboard() const
{ {
// This can happen when hosting server in android
if (!Android)
return true;
int32_t keyboard = AConfiguration_getKeyboard(Android->config); int32_t keyboard = AConfiguration_getKeyboard(Android->config);
return (keyboard == ACONFIGURATION_KEYBOARD_QWERTY); return (keyboard == ACONFIGURATION_KEYBOARD_QWERTY);
} }