diff --git a/modules/juce_opengl/opengl/juce_OpenGLContext.cpp b/modules/juce_opengl/opengl/juce_OpenGLContext.cpp index f1acbf6c4c..27f8ace149 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLContext.cpp +++ b/modules/juce_opengl/opengl/juce_OpenGLContext.cpp @@ -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();