wayland/keyboard: Don't free NULL anonymous file

Use g_clear_pointer() instead, as meta_anonymous_file_free() rightfully
doesn't like being passed NULL.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1822>
This commit is contained in:
Jonas Ådahl 2021-04-14 15:13:08 +02:00 committed by Marge Bot
parent c614cc3e82
commit 8303752e32

View File

@ -536,7 +536,7 @@ meta_wayland_xkb_info_destroy (MetaWaylandXkbInfo *xkb_info)
{
g_clear_pointer (&xkb_info->keymap, xkb_keymap_unref);
g_clear_pointer (&xkb_info->state, xkb_state_unref);
meta_anonymous_file_free (xkb_info->keymap_rofile);
g_clear_pointer (&xkb_info->keymap_rofile, meta_anonymous_file_free);
}
void