From 86b28cfe0be72f2f47597c24f17f3393491c1fea Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Wed, 5 Aug 2020 21:58:14 +0000 Subject: [PATCH] Bug 1656853 - Check for EGL context to be alive on destruction r=aosmond,jgilbert This probably doesn't matter, as the changes will be rolled back by https://phabricator.services.mozilla.com/D85496 But the change should fix the crash anyway, for now. Differential Revision: https://phabricator.services.mozilla.com/D86069 --- gfx/gl/GLContextProviderEGL.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/gl/GLContextProviderEGL.cpp b/gfx/gl/GLContextProviderEGL.cpp index 55509bb1955e..fc7327284d11 100644 --- a/gfx/gl/GLContextProviderEGL.cpp +++ b/gfx/gl/GLContextProviderEGL.cpp @@ -392,7 +392,7 @@ GLContextEGL::~GLContextEGL() { MarkDestroyed(); // Wrapped context should not destroy eglContext/Surface - if (!mOwnsContext) { + if (!mOwnsContext || !mEgl->IsAlive()) { return; }