[client] egl: check for null before free

This commit is contained in:
Geoffrey McRae 2022-05-22 12:05:02 +10:00
parent 947db38bc9
commit 6699018ed1

View File

@ -79,6 +79,8 @@ bool egl_textureInit(EGL_Texture ** texture_, EGLDisplay * display,
void egl_textureFree(EGL_Texture ** tex) void egl_textureFree(EGL_Texture ** tex)
{ {
EGL_Texture * this = *tex; EGL_Texture * this = *tex;
if (!this)
return;
glDeleteSamplers(1, &this->sampler); glDeleteSamplers(1, &this->sampler);