diff --git a/gdk/wayland/gdkapplaunchcontext-wayland.c b/gdk/wayland/gdkapplaunchcontext-wayland.c index c9498e507c..c8bf5afd25 100644 --- a/gdk/wayland/gdkapplaunchcontext-wayland.c +++ b/gdk/wayland/gdkapplaunchcontext-wayland.c @@ -73,8 +73,9 @@ gdk_wayland_app_launch_context_get_startup_notify_id (GAppLaunchContext *context xdg_activation_token_v1_set_serial (token, _gdk_wayland_seat_get_last_implicit_grab_serial (seat, NULL), gdk_wayland_seat_get_wl_seat (GDK_SEAT (seat))); - xdg_activation_token_v1_set_surface (token, - gdk_wayland_surface_get_wl_surface (focus_surface)); + if (focus_surface) + xdg_activation_token_v1_set_surface (token, + gdk_wayland_surface_get_wl_surface (focus_surface)); xdg_activation_token_v1_commit (token); while (app_launch_data.token == NULL)