mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-04-25 00:20:46 +02:00
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
1 changed files with 5 additions and 0 deletions
|
|
@ -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…
Add table
Reference in a new issue