[Xfce4-commits] <xfwm4:libxfce4ui> Check for invalid type for GValue to avoid a crash (bug #6195)
Jérôme Guelfucci
noreply at xfce.org
Sat Feb 27 01:04:16 CET 2010
Updating branch refs/heads/libxfce4ui
to b8a8290970f674ae39f0269199dc5c6414114679 (commit)
from 09e3177303833eb658ac3de6b7d57e1f88057bcd (commit)
commit b8a8290970f674ae39f0269199dc5c6414114679
Author: Olivier Fourdan <fourdan at xfce.org>
Date: Tue Feb 23 21:38:34 2010 +0100
Check for invalid type for GValue to avoid a crash (bug #6195)
settings-dialogs/xfwm4-settings.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/settings-dialogs/xfwm4-settings.c b/settings-dialogs/xfwm4-settings.c
index 91c4408..a2e163b 100644
--- a/settings-dialogs/xfwm4-settings.c
+++ b/settings-dialogs/xfwm4-settings.c
@@ -1470,6 +1470,7 @@ xfwm_settings_title_alignment_property_changed (XfconfChannel *channel,
GtkTreeIter iter;
GtkWidget *combo;
gchar *alignment;
+ const gchar *new_value;
g_return_if_fail (XFWM_IS_SETTINGS (settings));
@@ -1482,7 +1483,12 @@ xfwm_settings_title_alignment_property_changed (XfconfChannel *channel,
{
gtk_tree_model_get (model, &iter, 1, &alignment, -1);
- if (G_UNLIKELY (g_str_equal (alignment, g_value_get_string (value))))
+ if (G_UNLIKELY (G_VALUE_TYPE (value) == G_TYPE_INVALID))
+ new_value = "center";
+ else
+ new_value = g_value_get_string (value);
+
+ if (G_UNLIKELY (g_str_equal (alignment, new_value)))
{
g_free (alignment);
gtk_combo_box_set_active_iter (GTK_COMBO_BOX (combo), &iter);
More information about the Xfce4-commits
mailing list