diff --git a/gfx/gl/SharedSurfaceGL.cpp b/gfx/gl/SharedSurfaceGL.cpp index adb4429ae8..2639d64afa 100644 --- a/gfx/gl/SharedSurfaceGL.cpp +++ b/gfx/gl/SharedSurfaceGL.cpp @@ -94,7 +94,8 @@ SharedSurface_Basic::~SharedSurface_Basic() mGL->fDeleteFramebuffers(1, &mFB); if (mOwnsTex) - mGL->fDeleteTextures(1, &mTex); + if (mTex) + mGL->fDeleteTextures(1, &mTex); }