[gnome-settings-daemon/gnome-3-22] 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-22] wacom: Avoid warnings when switching VTs
- Date: Mon, 10 Oct 2016 14:32:31 +0000 (UTC)
commit 395e9061b7ba6ef7f4c61de74373639447aa9af9
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]