From 292d2f44ee47f36cf99cddcef6c11e0c38ecbcff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 21 Oct 2018 09:14:02 +0200 Subject: [PATCH] GL: Also skip gl calls in ThreadEnd during shutdown on Android. May help #11063 --- ext/native/thin3d/GLRenderManager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ext/native/thin3d/GLRenderManager.cpp b/ext/native/thin3d/GLRenderManager.cpp index 49334d27fa2d..64852bf1003c 100644 --- a/ext/native/thin3d/GLRenderManager.cpp +++ b/ext/native/thin3d/GLRenderManager.cpp @@ -130,8 +130,9 @@ void GLRenderManager::ThreadEnd() { // Good point to run all the deleters to get rid of leftover objects. for (int i = 0; i < MAX_INFLIGHT_FRAMES; i++) { - frameData_[i].deleter.Perform(this, false); - frameData_[i].deleter_prev.Perform(this, false); + // Since we're in shutdown, we should skip the GL calls on Android. + frameData_[i].deleter.Perform(this, skipGLCalls_); + frameData_[i].deleter_prev.Perform(this, skipGLCalls_); for (int j = 0; j < (int)frameData_[i].steps.size(); j++) { delete frameData_[i].steps[j]; }