backend-wayland: Abort early when wl_shm isn’t advertised
This prevents a segfault in libwayland-cursor when the parent compositor doesn’t have any of the needed protocols implemented. Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
This commit is contained in:
parent
557dea5660
commit
0b48e6b5ca
@ -2760,6 +2760,11 @@ wayland_backend_create(struct weston_compositor *compositor,
|
||||
wl_registry_add_listener(b->parent.registry, ®istry_listener, b);
|
||||
wl_display_roundtrip(b->parent.wl_display);
|
||||
|
||||
if (b->parent.shm == NULL) {
|
||||
weston_log("Error: Failed to retrieve wl_shm from parent Wayland compositor\n");
|
||||
goto err_display;
|
||||
}
|
||||
|
||||
create_cursor(b, new_config);
|
||||
|
||||
#ifdef ENABLE_EGL
|
||||
|
Loading…
Reference in New Issue
Block a user