[gnome-control-center] color: Fix a crash where out internal state gets screwed up
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] color: Fix a crash where out internal state gets screwed up
- Date: Mon, 22 Aug 2011 22:06:06 +0000 (UTC)
commit e06ccd9c9eec6bb0a61fb3ba9146e2c8130077b3
Author: Richard Hughes <richard hughsie com>
Date: Mon Aug 22 21:07:10 2011 +0100
color: Fix a crash where out internal state gets screwed up
I'm just looking for the real bug now.
panels/color/cc-color-panel.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/panels/color/cc-color-panel.c b/panels/color/cc-color-panel.c
index b172b91..b0ffbb8 100644
--- a/panels/color/cc-color-panel.c
+++ b/panels/color/cc-color-panel.c
@@ -604,6 +604,11 @@ gcm_prefs_button_assign_ok_cb (GtkWidget *widget, CcColorPanel *prefs)
gtk_tree_model_get (model, &iter,
GCM_PREFS_COMBO_COLUMN_PROFILE, &profile,
-1);
+ if (profile == NULL)
+ {
+ g_warning ("failed to get the active profile");
+ goto out;
+ }
/* just add it, the list store will get ::changed */
ret = cd_device_add_profile_sync (priv->current_device,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]