Fix segfault when using fullscreen when just hotplugging the display

Set the fullscreen_output to NULL when output gets destroyed. Otherwise,
a use-after-free case can happen, which result in a SEGFAULT crash.

Fixes #766

Signed-off-by: Paul Pu <hui.pu@gehealthcare.com>
This commit is contained in:
Paul Pu 2024-02-19 09:20:54 +08:00
parent 4261892d77
commit 4eee3c816d

View file

@ -1692,6 +1692,8 @@ notify_output_destroy(struct wl_listener *listener, void *data)
shsurf->output = NULL;
shsurf->output_destroy_listener.notify = NULL;
shsurf->fullscreen_output = NULL;
}
static void