render/allocator: ignore NULL in wlr_allocator_destroy

This commit is contained in:
Simon Ser 2020-12-04 15:35:59 +01:00
parent 0dcdb5e7a1
commit bdf26f87d5
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48

View file

@ -10,6 +10,9 @@ void wlr_allocator_init(struct wlr_allocator *alloc,
} }
void wlr_allocator_destroy(struct wlr_allocator *alloc) { void wlr_allocator_destroy(struct wlr_allocator *alloc) {
if (alloc == NULL) {
return;
}
wl_signal_emit(&alloc->events.destroy, NULL); wl_signal_emit(&alloc->events.destroy, NULL);
alloc->impl->destroy(alloc); alloc->impl->destroy(alloc);
} }