From d555ae95712cfcbf81be69ea2213bda83e6face3 Mon Sep 17 00:00:00 2001 From: Lynne Date: Mon, 31 Oct 2022 23:50:21 +0100 Subject: [PATCH] wayland_common: always zero out presentation context when destroying it A desync between the feedback and the feedback in the context still happens when closing a hidden surface. --- video/out/wayland_common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index 308e035ccd..51f68a46a6 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -1019,8 +1019,10 @@ static void feedback_presented(void *data, struct wp_presentation_feedback *fbac // NULL is needed to prevent a dangling pointer since presentation_feedback // is created in the frame_callback and not in any of the actual presentation // events. - if (fback) + if (fback) { wp_presentation_feedback_destroy(fback); + wl->feedback = NULL; + } if (!wl->use_present) return;