Skip to content

Commit 2b4e92d

Browse files
authored
Merge pull request #1519 from asurdej-comcast/wpe-2.46/bitmap_texture
[2.46] [BitmapTexture] Check EGL context before destruction
2 parents 7d0c0ff + 898eea2 commit 2b4e92d

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Source/WebCore/platform/graphics/texmap/BitmapTexture.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,12 @@ void BitmapTexture::bindAsSurface()
288288

289289
BitmapTexture::~BitmapTexture()
290290
{
291+
GLContext* currentContext = GLContext::current();
292+
if (!currentContext || !currentContext->platformContext()) {
293+
// The context has been destroyed already, so we can't clean up.
294+
return;
295+
}
296+
291297
glDeleteTextures(1, &m_id);
292298

293299
if (m_fbo)

0 commit comments

Comments
 (0)