[gnome-color-manager] Don't crash and burn when there are no devices in the list
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-color-manager] Don't crash and burn when there are no devices in the list
- Date: Thu, 5 Nov 2009 13:50:35 +0000 (UTC)
commit 8482ad6d6fc2705e2e6b8ee0021a24ba3dd8703a
Author: Richard Hughes <richard hughsie com>
Date: Thu Nov 5 13:49:43 2009 +0000
Don't crash and burn when there are no devices in the list
src/gcm-prefs.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/gcm-prefs.c b/src/gcm-prefs.c
index 1401919..4d92fd9 100644
--- a/src/gcm-prefs.c
+++ b/src/gcm-prefs.c
@@ -530,6 +530,10 @@ gcm_prefs_profile_combo_changed_cb (GtkWidget *widget, gpointer data)
active = gtk_combo_box_get_active (GTK_COMBO_BOX(widget));
egg_debug ("now %i", active);
+ /* no devices */
+ if (current_device == NULL)
+ return;
+
if (active < profiles_array->len)
filename = g_ptr_array_index (profiles_array, active);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]