aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-12-04 15:35:59 +0100
committerSimon Ser <contact@emersion.fr>2020-12-17 20:34:19 +0100
commitbdf26f87d548c75f5ef90f21645d2370a6ee34f6 (patch)
treec77eddb23da12dc057b4b9e5fc50da21d298ef03
parent0dcdb5e7a1def069ca31b50cc4c5a84031e4a730 (diff)
render/allocator: ignore NULL in wlr_allocator_destroy
-rw-r--r--render/allocator.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/render/allocator.c b/render/allocator.c
index 3638bd62..ea1712e9 100644
--- a/render/allocator.c
+++ b/render/allocator.c
@@ -10,6 +10,9 @@ void wlr_allocator_init(struct wlr_allocator *alloc,
}
void wlr_allocator_destroy(struct wlr_allocator *alloc) {
+ if (alloc == NULL) {
+ return;
+ }
wl_signal_emit(&alloc->events.destroy, NULL);
alloc->impl->destroy(alloc);
}