[gnome-settings-daemon/gnome-3-20] wacom: Avoid warnings when switching VTs
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/gnome-3-20] wacom: Avoid warnings when switching VTs
- Date: Sat, 8 Oct 2016 14:07:34 +0000 (UTC)
commit 656aa63d678fbf7ff91af614ffbedd8c4b5753c4
Author: Bastien Nocera <hadess hadess net>
Date: Fri Oct 7 18:42:58 2016 +0200
wacom: Avoid warnings when switching VTs
We get called for every removed GDK device, so check whether it's of
interest early, instead after throwing a bunch of warnings.
gsd-wacom[1884]: g_signal_handlers_disconnect_matched: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
gsd-wacom[1884]: gsd_wacom_device_get_device_type: assertion 'GSD_IS_WACOM_DEVICE (device)' failed
gsd-wacom[1884]: gsd_wacom_device_get_settings: assertion 'GSD_IS_WACOM_DEVICE (device)' failed
gsd-wacom[1884]: invalid (NULL) pointer instance
https://bugzilla.gnome.org/show_bug.cgi?id=772581
plugins/wacom/gsd-wacom-manager.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-manager.c b/plugins/wacom/gsd-wacom-manager.c
index 179aa0b..ca11dd4 100644
--- a/plugins/wacom/gsd-wacom-manager.c
+++ b/plugins/wacom/gsd-wacom-manager.c
@@ -1175,6 +1175,9 @@ gsd_wacom_manager_remove_gdk_device (GsdWacomManager *manager,
gdk_device_get_name (gdk_device));
device = g_hash_table_lookup (manager->priv->devices, gdk_device);
+ if (!device)
+ return;
+
type = gsd_wacom_device_get_device_type (device);
settings = gsd_wacom_device_get_settings (device);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]