summaryrefslogtreecommitdiff
path: root/gfx/gl/SharedSurfaceGL.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/gl/SharedSurfaceGL.cpp')
-rw-r--r--gfx/gl/SharedSurfaceGL.cpp3
1 files changed, 2 insertions, 1 deletions
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);
}