[gimp/metadata-browser] Bug 660067 - GIMP crashes after Wacom tablet's hot unplug
- From: Roman Joost <romanofski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/metadata-browser] Bug 660067 - GIMP crashes after Wacom tablet's hot unplug
- Date: Wed, 28 Sep 2011 10:52:47 +0000 (UTC)
commit 4fc8a8b96ebf9562973dc8329b1758e462511e4f
Author: Michael Natterer <mitch gimp org>
Date: Mon Sep 26 22:35:45 2011 +0200
Bug 660067 - GIMP crashes after Wacom tablet's hot unplug
Don't call gimp_input_device_store_lookup() with a NULL name. Unplug
seems broken because we always get name == NULL, I need to fix this
but at least it doesn't crash any longer (and the fix is generally
correct and not a workaround).
modules/gimpinputdevicestore-gudev.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/modules/gimpinputdevicestore-gudev.c b/modules/gimpinputdevicestore-gudev.c
index 072679e..d10874b 100644
--- a/modules/gimpinputdevicestore-gudev.c
+++ b/modules/gimpinputdevicestore-gudev.c
@@ -334,13 +334,16 @@ gimp_input_device_store_remove (GimpInputDeviceStore *store,
const gchar *name = g_udev_device_get_sysfs_attr (device, "name");
GtkTreeIter iter;
- if (gimp_input_device_store_lookup (store, name, &iter))
+ if (name)
{
- gtk_list_store_remove (GTK_LIST_STORE (store), &iter);
+ if (gimp_input_device_store_lookup (store, name, &iter))
+ {
+ gtk_list_store_remove (GTK_LIST_STORE (store), &iter);
- g_signal_emit (store, store_signals[DEVICE_REMOVED], 0, name);
+ g_signal_emit (store, store_signals[DEVICE_REMOVED], 0, name);
- return TRUE;
+ return TRUE;
+ }
}
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]