virtual-input-device/native: Verify device cleanup in impl_state_free()

We free it in the task function, so it's already NULL when freeing the
state struct. Change the redudant unref to a NULL check warning.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1688>
This commit is contained in:
Jonas Ådahl 2021-01-26 23:02:26 +01:00 committed by Marge Bot
parent 671bda2509
commit 9de36fed4d

View File

@ -1033,7 +1033,7 @@ meta_virtual_input_device_native_constructed (GObject *object)
static void
impl_state_free (ImplState *impl_state)
{
g_clear_object (&impl_state->device);
g_warn_if_fail (!impl_state->device);
g_free (impl_state);
}