aboutsummaryrefslogtreecommitdiff
path: root/render/wlr_renderer.c
diff options
context:
space:
mode:
Diffstat (limited to 'render/wlr_renderer.c')
-rw-r--r--render/wlr_renderer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/render/wlr_renderer.c b/render/wlr_renderer.c
index 15b8b999..2f6c7fad 100644
--- a/render/wlr_renderer.c
+++ b/render/wlr_renderer.c
@@ -8,8 +8,10 @@ void wlr_renderer_init(struct wlr_renderer *renderer,
}
void wlr_renderer_destroy(struct wlr_renderer *r) {
- if (r && r->impl->destroy) {
+ if (r && r->impl && r->impl->destroy) {
r->impl->destroy(r);
+ } else {
+ free(r);
}
}