mirror of
https://gitlab.gnome.org/GNOME/glade.git
synced 2025-10-06 00:05:26 -04:00
Don't crash if the widget doesn't have a valid icon.
This commit is contained in:
parent
50313bb5eb
commit
a2ac8937bf
@ -61,6 +61,11 @@
|
||||
* src/glade-utils.c: missing include.
|
||||
* src/glade-placeholder: missing include.
|
||||
|
||||
2004-01-15 Paolo Borelli <pborelli@katamail.com>
|
||||
|
||||
* src/glade-project-view.c: don't crash im the widget doesn't have
|
||||
a valid icon.
|
||||
|
||||
2003-11-13 Paolo Borelli <pborelli@katamail.com>
|
||||
|
||||
* src/glade-command.c: free the value of the set property command in the
|
||||
|
@ -427,13 +427,17 @@ glade_project_view_cell_function (GtkTreeViewColumn *tree_column,
|
||||
g_return_if_fail (widget->class->icon != NULL);
|
||||
|
||||
if (is_icon)
|
||||
g_object_set (G_OBJECT (cell),
|
||||
"pixbuf", gtk_image_get_pixbuf (GTK_IMAGE (widget->class->icon)),
|
||||
NULL);
|
||||
{
|
||||
if (gtk_image_get_storage_type GTK_IMAGE (widget->class->icon) != GTK_IMAGE_PIXBUF)
|
||||
return;
|
||||
|
||||
g_object_set (G_OBJECT (cell), "pixbuf",
|
||||
gtk_image_get_pixbuf (GTK_IMAGE (widget->class->icon)), NULL);
|
||||
}
|
||||
else
|
||||
g_object_set (G_OBJECT (cell),
|
||||
"text", widget->name,
|
||||
NULL);
|
||||
{
|
||||
g_object_set (G_OBJECT (cell), "text", widget->name, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
x
Reference in New Issue
Block a user