diff options
Diffstat (limited to 'render/wlr_texture.c')
-rw-r--r-- | render/wlr_texture.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/render/wlr_texture.c b/render/wlr_texture.c index 72d56c8f..f98284a1 100644 --- a/render/wlr_texture.c +++ b/render/wlr_texture.c @@ -9,8 +9,10 @@ void wlr_texture_init(struct wlr_texture *texture, } void wlr_texture_destroy(struct wlr_texture *texture) { - if (texture && texture->impl->destroy) { + if (texture && texture->impl && texture->impl->destroy) { texture->impl->destroy(texture); + } else { + free(texture); } } |