From 9de36fed4dfa392b5c826fc73b97467c754d2e3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Tue, 26 Jan 2021 23:02:26 +0100 Subject: [PATCH] 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: --- src/backends/native/meta-virtual-input-device-native.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backends/native/meta-virtual-input-device-native.c b/src/backends/native/meta-virtual-input-device-native.c index e6d9f47df..d2d13748a 100644 --- a/src/backends/native/meta-virtual-input-device-native.c +++ b/src/backends/native/meta-virtual-input-device-native.c @@ -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); }