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.
This commit is contained in:
Lynne 2022-10-31 23:50:21 +01:00 committed by Dudemanguy
parent 5fa3bca863
commit d555ae9571
1 changed files with 3 additions and 1 deletions

View File

@ -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;