main: Fix crashes with non-wlroots compositors
parent
fb4c5c55a1
commit
5ef322701e
|
@ -580,8 +580,11 @@ static int init_wayland(struct wayvnc* self, const char* display)
|
||||||
|
|
||||||
failure:
|
failure:
|
||||||
wl_display_disconnect(self->display);
|
wl_display_disconnect(self->display);
|
||||||
|
self->display = NULL;
|
||||||
handler_failure:
|
handler_failure:
|
||||||
|
if (self->wl_handler)
|
||||||
aml_unref(self->wl_handler);
|
aml_unref(self->wl_handler);
|
||||||
|
self->wl_handler = NULL;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue