Fixed WindowImplAndroid used after deleted.

This commit is contained in:
acsbendi 2019-04-25 14:16:04 +02:00 committed by Lukas Dürrenberger
parent f3a180bc09
commit 20c23f0007

View File

@ -84,6 +84,7 @@ WindowImplAndroid::WindowImplAndroid(VideoMode mode, const String& title, unsign
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
WindowImplAndroid::~WindowImplAndroid() WindowImplAndroid::~WindowImplAndroid()
{ {
WindowImplAndroid::singleInstance = NULL;
} }
@ -215,6 +216,8 @@ bool WindowImplAndroid::hasFocus() const
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void WindowImplAndroid::forwardEvent(const Event& event) void WindowImplAndroid::forwardEvent(const Event& event)
{
if (WindowImplAndroid::singleInstance != NULL)
{ {
ActivityStates* states = getActivity(NULL); ActivityStates* states = getActivity(NULL);
@ -233,6 +236,7 @@ void WindowImplAndroid::forwardEvent(const Event& event)
WindowImplAndroid::singleInstance->pushEvent(event); WindowImplAndroid::singleInstance->pushEvent(event);
} }
}
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////