From 2a45b7de7cf5955b81cc1778dbb5085bfabb1c56 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Corentin=20No=C3=ABl?= <corentin@elementary.io>
Date: Sat, 2 Jun 2018 19:16:32 +0100
Subject: [PATCH] clutter-input-device-xi2: Check for null group_modes before
unref
---
clutter/clutter/x11/clutter-input-device-xi2.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/clutter/clutter/x11/clutter-input-device-xi2.c b/clutter/clutter/x11/clutter-input-device-xi2.c
index f62ba85dcb..1254aca3ae 100644
--- a/clutter/clutter/x11/clutter-input-device-xi2.c
+++ b/clutter/clutter/x11/clutter-input-device-xi2.c
@@ -110,7 +110,8 @@ clutter_input_device_xi2_finalize (GObject *object)
if (device_xi2->wacom_device)
libwacom_destroy (device_xi2->wacom_device);
- g_array_unref (device_xi2->group_modes);
+ if (device_xi2->group_modes)
+ g_array_unref (device_xi2->group_modes);
#endif
G_OBJECT_CLASS (clutter_input_device_xi2_parent_class)->finalize (object);
--
2.23.0.rc1