aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-03-30 16:35:14 +0200
committerdec05eba <dec05eba@protonmail.com>2022-03-30 16:35:14 +0200
commitb2fccb5f31df075e205d3fd5c9bfe7db3a9aecfe (patch)
treee652993e3ddcb20fbb9c72637e36f817d4342796
parent773b13bf4d2d9a10f1fa43b5f863013d3b0fc85b (diff)
Cleanup the correct resources on resize failure
-rw-r--r--window_texture.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/window_texture.c b/window_texture.c
index 1c73ed0..ccd8947 100644
--- a/window_texture.c
+++ b/window_texture.c
@@ -169,9 +169,9 @@ int window_texture_on_resize(WindowTexture *self) {
cleanup:
if(texture_id != 0) glDeleteTextures(1, &texture_id);
- if(glx_pixmap) glXDestroyPixmap(self->display, self->glx_pixmap);
- if(glx_pixmap_bound) glXReleaseTexImageEXT(self->display, self->glx_pixmap, GLX_FRONT_EXT);
- if(pixmap) XFreePixmap(self->display, self->pixmap);
+ if(glx_pixmap) glXDestroyPixmap(self->display, glx_pixmap);
+ if(glx_pixmap_bound) glXReleaseTexImageEXT(self->display, glx_pixmap, GLX_FRONT_EXT);
+ if(pixmap) XFreePixmap(self->display, pixmap);
if(configs) XFree(configs);
return result;
}