kms/page-flip: Make destroy notify function optional

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2777>
This commit is contained in:
Jonas Ådahl 2022-12-21 18:49:24 +01:00
parent 587da92b0a
commit 6059d8f42d

View File

@ -80,6 +80,7 @@ static void
meta_kms_page_flip_closure_free (MetaKmsPageFlipClosure *closure)
{
g_clear_pointer (&closure->page_flip_data, meta_kms_page_flip_data_unref);
if (closure->destroy_notify)
g_clear_pointer (&closure->user_data, closure->destroy_notify);
g_free (closure);
}