mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -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);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
|
Loading…
Reference in New Issue
Block a user