Skip to content

wayland/surface: NULL check surface resource in handle_output_bound()

Otherwise binding new wl_output's might try to send enter to the destroyed resource. Fixes the following crash:

 #0 wl_resource_get_client at ../src/wayland-server.c:801
 #1 handle_output_bound at ../src/wayland/meta-wayland-surface.c:1287
 #3 signal_emit_unlocked_R.isra.0 at ../gobject/gsignal.c:3812
 #6 ffi_call_unix64 at ../src/x86/unix64.S:104
 #7 ffi_call_int at ../src/x86/ffi64.c:673
 #8 ffi_call at ../src/x86/ffi64.c:710
 #9 wl_closure_invoke at ../src/connection.c:1025
#10 wl_client_connection_data at ../src/wayland-server.c:438
#11 wl_event_loop_dispatch at ../src/event-loop.c:1027
#12 wayland_event_source_dispatch at ../src/wayland/meta-wayland.c:125
#15 g_main_context_iterate.isra.0 at ../glib/gmain.c:4276
#17 meta_context_run_main_loop at ../src/core/meta-context.c:482

Related: https://bugzilla.redhat.com/show_bug.cgi?id=2196527


Fallout from !1880 (merged). Unverified.

Merge request reports