summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2023-08-31 10:02:50 +0200
committerMoonchild <moonchild@palemoon.org>2023-08-31 10:02:50 +0200
commit7a4b8501505e9ed433db0b5a675bc38398b74bb8 (patch)
tree44b7101ae12ee2ca7a68c4ef7872812294665685
parent7de2732e7f68e55a24ee9628752a5a620d0eac6e (diff)
downloaduxp-7a4b8501505e9ed433db0b5a675bc38398b74bb8.tar.gz
[gfx] Check if we have a valid texture before trying to delete it.
-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);
}