Comment 7 for bug 938090

Revision history for this message
Michael Vogt (mvo) wrote :

This diff will probably fix the crash but maybe not the root cause that causes the icon_helper to be NULL - maybe a refcount problem?

diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c
index fa87ea7..0c728af 100644
--- a/gtk/gtkimage.c
+++ b/gtk/gtkimage.c
@@ -1065,6 +1065,7 @@ GtkImageType
 gtk_image_get_storage_type (GtkImage *image)
 {
   g_return_val_if_fail (GTK_IS_IMAGE (image), GTK_IMAGE_EMPTY);
+ g_return_val_if_fail (image->priv->icon_helper != NULL, GTK_IMAGE_EMPTY);

   return _gtk_icon_helper_get_storage_type (image->priv->icon_helper);
 }