menu/theme: use wlr_texture_destroy()

This commit is contained in:
Johan Malm 2021-07-01 19:21:09 +01:00
parent a7dfa965d1
commit 6ad8252de9
3 changed files with 23 additions and 24 deletions

View file

@ -56,6 +56,11 @@ static void
load_button(struct wlr_renderer *renderer, const char *filename,
struct wlr_texture **texture, char *button)
{
if (*texture) {
wlr_texture_destroy(*texture);
*texture = NULL;
}
/* Read file into memory as it's easier to tokenzie that way */
char *buffer = grab_file(xbm_path(filename));
if (!buffer) {