From 56c53b3b8f006a15c82937b4d856b1b1fe135863 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Thu, 31 Aug 2023 10:02:50 +0200 Subject: [PATCH] [gfx] Check if we have a valid texture before trying to delete it. --- gfx/gl/SharedSurfaceGL.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); }