mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +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()
|
||||
{
|
||||
#if JUCE_ANDROID
|
||||
context.executeOnGLThread ([this] (auto&) { nativeContext->notifyWillPause(); }, true);
|
||||
#endif
|
||||
|
||||
renderThread->remove (this);
|
||||
|
||||
if ((state.fetch_and (~StateFlags::initialised) & StateFlags::initialised) == 0)
|
||||
|
|
@ -205,6 +201,10 @@ public:
|
|||
ScopedContextActivator activator;
|
||||
activator.activate (context);
|
||||
|
||||
#if JUCE_ANDROID
|
||||
nativeContext->notifyWillPause();
|
||||
#endif
|
||||
|
||||
if (context.renderer != nullptr)
|
||||
context.renderer->openGLContextClosing();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue