mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
OpenGLContext (Android): Avoid potentially enqueuing work after context has already stopped
This commit is contained in:
parent
07a7c04d54
commit
c77e8a73cc
1 changed files with 4 additions and 4 deletions
|
|
@ -193,10 +193,6 @@ public:
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
void pause()
|
void pause()
|
||||||
{
|
{
|
||||||
#if JUCE_ANDROID
|
|
||||||
context.executeOnGLThread ([this] (auto&) { nativeContext->notifyWillPause(); }, true);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
renderThread->remove (this);
|
renderThread->remove (this);
|
||||||
|
|
||||||
if ((state.fetch_and (~StateFlags::initialised) & StateFlags::initialised) == 0)
|
if ((state.fetch_and (~StateFlags::initialised) & StateFlags::initialised) == 0)
|
||||||
|
|
@ -205,6 +201,10 @@ public:
|
||||||
ScopedContextActivator activator;
|
ScopedContextActivator activator;
|
||||||
activator.activate (context);
|
activator.activate (context);
|
||||||
|
|
||||||
|
#if JUCE_ANDROID
|
||||||
|
nativeContext->notifyWillPause();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (context.renderer != nullptr)
|
if (context.renderer != nullptr)
|
||||||
context.renderer->openGLContextClosing();
|
context.renderer->openGLContextClosing();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue