We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7d0c0ff + 898eea2 commit 2b4e92dCopy full SHA for 2b4e92d
1 file changed
Source/WebCore/platform/graphics/texmap/BitmapTexture.cpp
@@ -288,6 +288,12 @@ void BitmapTexture::bindAsSurface()
288
289
BitmapTexture::~BitmapTexture()
290
{
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
+
297
glDeleteTextures(1, &m_id);
298
299
if (m_fbo)
0 commit comments