glade3 r2176 - in trunk: . gladeui
- From: tvb svn gnome org
- To: svn-commits-list gnome org
- Subject: glade3 r2176 - in trunk: . gladeui
- Date: Mon, 23 Mar 2009 00:17:24 +0000 (UTC)
Author: tvb
Date: Mon Mar 23 00:17:23 2009
New Revision: 2176
URL: http://svn.gnome.org/viewvc/glade3?rev=2176&view=rev
Log:
* gladeui/glade-command.c: Fix win32 crasher (bug 575206) again (seems
I missed it was klass->name that was null, fixed it so it would never
be null, and added g_assert() where the crash was
Modified:
trunk/ChangeLog
trunk/gladeui/glade-command.c
trunk/gladeui/glade-property-class.c
Modified: trunk/gladeui/glade-command.c
==============================================================================
--- trunk/gladeui/glade-command.c (original)
+++ trunk/gladeui/glade-command.c Mon Mar 23 00:17:23 2009
@@ -603,17 +603,19 @@
(GLADE_WIDGET_ADAPTOR (sdata->property->klass->handle),
sdata->property->klass, sdata->new_value, fmt);
+ g_assert (sdata->property->klass->name);
+ g_assert (sdata->property->widget->name);
+
if (!value_name || strlen (value_name) > MAX_UNDO_MENU_ITEM_VALUE_LEN
|| strchr (value_name, '_')) {
description = g_strdup_printf (_("Setting %s of %s"),
sdata->property->klass->name,
- sdata->property->widget->name ?
- sdata->property->widget->name : "-");
+ sdata->property->widget->name);
} else {
description = g_strdup_printf (_("Setting %s of %s to %s"),
sdata->property->klass->name,
- sdata->property->widget->name ?
- sdata->property->widget->name : "-", value_name);
+ sdata->property->widget->name,
+ value_name);
}
g_free (value_name);
}
Modified: trunk/gladeui/glade-property-class.c
==============================================================================
--- trunk/gladeui/glade-property-class.c (original)
+++ trunk/gladeui/glade-property-class.c Mon Mar 23 00:17:23 2009
@@ -1493,7 +1493,7 @@
klass->tooltip = g_strdup (g_param_spec_get_blurb (klass->pspec));
}
- if (strcmp (g_param_spec_get_nick (klass->pspec), "dummy") != 0)
+ if (klass->name == NULL || strcmp (g_param_spec_get_nick (klass->pspec), "dummy") != 0)
{
g_free (klass->name);
klass->name = g_strdup (g_param_spec_get_nick (klass->pspec));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]