[gfx] Check if we have a valid texture before trying to delete it.

This commit is contained in:
Moonchild 2023-08-31 10:02:50 +02:00 committed by roytam1
commit 56c53b3b8f

View file

@ -94,7 +94,8 @@ SharedSurface_Basic::~SharedSurface_Basic()
mGL->fDeleteFramebuffers(1, &mFB);
if (mOwnsTex)
mGL->fDeleteTextures(1, &mTex);
if (mTex)
mGL->fDeleteTextures(1, &mTex);
}