mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
Fixed WindowImplAndroid used after deleted.
This commit is contained in:
parent
f3a180bc09
commit
20c23f0007
@ -84,6 +84,7 @@ WindowImplAndroid::WindowImplAndroid(VideoMode mode, const String& title, unsign
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
WindowImplAndroid::~WindowImplAndroid()
|
WindowImplAndroid::~WindowImplAndroid()
|
||||||
{
|
{
|
||||||
|
WindowImplAndroid::singleInstance = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -216,6 +217,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);
|
||||||
|
|
||||||
if (event.type == Event::GainedFocus)
|
if (event.type == Event::GainedFocus)
|
||||||
@ -232,6 +235,7 @@ void WindowImplAndroid::forwardEvent(const Event& event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
WindowImplAndroid::singleInstance->pushEvent(event);
|
WindowImplAndroid::singleInstance->pushEvent(event);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user