From: Matthias Clasen Date: Tue, 22 Aug 2023 12:26:22 +0000 (-0400) Subject: wayland: Don't assume the shell protocol X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2^2~8 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ff56029ccc2ebd55b992c60f4be2ab471ce9da35;p=gtk4.git wayland: Don't assume the shell protocol The gtk_shell proxy will be NULL if the compositor is not gnome-shell. Handle that without crashing. Fixes: #6048 --- diff --git a/gdk/wayland/gdkapplaunchcontext-wayland.c b/gdk/wayland/gdkapplaunchcontext-wayland.c index 176bfc8942..75742dd8e5 100644 --- a/gdk/wayland/gdkapplaunchcontext-wayland.c +++ b/gdk/wayland/gdkapplaunchcontext-wayland.c @@ -93,7 +93,8 @@ gdk_wayland_app_launch_context_get_startup_notify_id (GAppLaunchContext *context id = app_launch_data.token; wl_event_queue_destroy (event_queue); } - else if (gtk_shell1_get_version (display->gtk_shell) >= GTK_SHELL1_NOTIFY_LAUNCH_SINCE_VERSION) + else if (display->gtk_shell && + gtk_shell1_get_version (display->gtk_shell) >= GTK_SHELL1_NOTIFY_LAUNCH_SINCE_VERSION) { id = g_uuid_string_random (); gtk_shell1_notify_launch (display->gtk_shell, id);