backend/wayland: stop initializing renderer and allocator during creation

This commit is contained in:
Simon Zeni 2021-09-13 16:29:59 -04:00
parent b55acfcc16
commit 332ecfc1f1

View file

@ -444,19 +444,11 @@ struct wlr_backend *wlr_wl_backend_create(struct wl_display *display,
wl->drm_fd = -1;
}
struct wlr_renderer *renderer = wlr_backend_get_renderer(&wl->backend);
struct wlr_allocator *allocator = backend_get_allocator(&wl->backend);
if (renderer == NULL || allocator == NULL) {
goto error_drm_fd;
}
wl->local_display_destroy.notify = handle_display_destroy;
wl_display_add_destroy_listener(display, &wl->local_display_destroy);
return &wl->backend;
error_drm_fd:
close(wl->drm_fd);
error_remote_display_src:
wl_event_source_remove(wl->remote_display_src);
error_registry: