Commit 8f288134 authored by Tristan Van Berkom's avatar Tristan Van Berkom
Browse files

Fix win32 crasher (bug 575206) again (seems I missed it was klass->name


	* 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


svn path=/trunk/; revision=2176
parent 8ed32ac9
2009-03-21 Tristan Van Berkom <tvb@gnome.org>
* 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
2009-03-21 Tristan Van Berkom <tvb@gnome.org>
* gladeui/glade-command.c: Fix win32 crasher (bug 575206)
......
......@@ -603,17 +603,19 @@ glade_command_set_property_description (GladeCommandSetProperty *me,
(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);
}
......
......@@ -1493,7 +1493,7 @@ glade_property_class_update_from_node (GladeXmlNode *node,
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));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment