Drop tmp_buffer if no texture allocated

This commit is contained in:
Simon Long 2024-05-15 18:47:13 +01:00
parent 6249a3e61c
commit 8d5bfe1e0e

View file

@ -115,6 +115,8 @@ magnify(struct output *output, struct wlr_buffer *output_buffer, struct wlr_box
}
if (!tmp_texture) {
wlr_log(WLR_ERROR, "Failed to allocate temporary texture");
wlr_buffer_drop(tmp_buffer);
tmp_buffer = NULL;
return;
}