[mutter] virtual-input-device/native: Verify device cleanup in impl_state_free()
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] virtual-input-device/native: Verify device cleanup in impl_state_free()
- Date: Tue, 23 Feb 2021 10:28:42 +0000 (UTC)
commit 9de36fed4dfa392b5c826fc73b97467c754d2e3c
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Tue Jan 26 23:02:26 2021 +0100
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>
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 e6d9f47dfc..d2d13748ab 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]