Author: kelnos Date: 2008-09-07 06:18:28 +0000 (Sun, 07 Sep 2008) New Revision: 27705
Modified: xfconf/trunk/xfconf/xfconf-channel.c Log: fix crash when setting an array property when the arr items *don't* have int16s Modified: xfconf/trunk/xfconf/xfconf-channel.c =================================================================== --- xfconf/trunk/xfconf/xfconf-channel.c 2008-09-07 06:18:16 UTC (rev 27704) +++ xfconf/trunk/xfconf/xfconf-channel.c 2008-09-07 06:18:28 UTC (rev 27705) @@ -1040,10 +1040,13 @@ g_value_init(&tmp_val, G_TYPE_INT); g_value_set_int(&tmp_val, xfconf_g_value_get_int16(value)); } else if(G_VALUE_TYPE(value) == XFCONF_TYPE_G_VALUE_ARRAY) { - val = &tmp_val; arr_new = xfconf_fixup_16bit_ints(g_value_get_boxed(value)); - g_value_init(&tmp_val, XFCONF_TYPE_G_VALUE_ARRAY); - g_value_set_boxed(&tmp_val, arr_new); + if(arr_new) { + val = &tmp_val; + g_value_init(&tmp_val, XFCONF_TYPE_G_VALUE_ARRAY); + g_value_set_boxed(&tmp_val, arr_new); + } else + val = (GValue *)value; } else val = (GValue *)value; _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits