main: Fix crashes with non-wlroots compositors

v0.8
Andri Yngvason 2023-12-26 15:10:29 +00:00
parent fb4c5c55a1
commit 5ef322701e
1 changed files with 4 additions and 1 deletions

View File

@ -580,8 +580,11 @@ static int init_wayland(struct wayvnc* self, const char* display)
failure:
wl_display_disconnect(self->display);
self->display = NULL;
handler_failure:
if (self->wl_handler)
aml_unref(self->wl_handler);
self->wl_handler = NULL;
return -1;
}