diff options
author | Milan Crha <mcrha@redhat.com> | 2014-01-17 23:24:42 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2014-01-17 23:24:42 +0800 |
commit | d64150ab966cfd9d661aa06999573fe42fe2671e (patch) | |
tree | 429361eb1d6127064495d0389b44da40efab54ff /e-util | |
parent | d28d3b3ddb7550ae86e298fd9f6572da8ef5a039 (diff) | |
download | gsoc2013-evolution-d64150ab966cfd9d661aa06999573fe42fe2671e.tar gsoc2013-evolution-d64150ab966cfd9d661aa06999573fe42fe2671e.tar.gz gsoc2013-evolution-d64150ab966cfd9d661aa06999573fe42fe2671e.tar.bz2 gsoc2013-evolution-d64150ab966cfd9d661aa06999573fe42fe2671e.tar.lz gsoc2013-evolution-d64150ab966cfd9d661aa06999573fe42fe2671e.tar.xz gsoc2013-evolution-d64150ab966cfd9d661aa06999573fe42fe2671e.tar.zst gsoc2013-evolution-d64150ab966cfd9d661aa06999573fe42fe2671e.zip |
Bug #702958 - Crash on attachment add or remove
Diffstat (limited to 'e-util')
-rw-r--r-- | e-util/e-attachment.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/e-util/e-attachment.c b/e-util/e-attachment.c index ea4f39cd9b..8230eab17a 100644 --- a/e-util/e-attachment.c +++ b/e-util/e-attachment.c @@ -334,6 +334,9 @@ attachment_update_icon_column_idle_cb (gpointer weak_ref) if (file_info != NULL) { icon = g_file_info_get_icon (file_info); + /* add the reference here, thus the create_system_thumbnail() can unref the *icon. */ + if (icon) + g_object_ref (icon); thumbnail_path = g_file_info_get_attribute_byte_string ( file_info, G_FILE_ATTRIBUTE_THUMBNAIL_PATH); } @@ -351,11 +354,11 @@ attachment_update_icon_column_idle_cb (gpointer weak_ref) /* Nothing to do, just use the icon. */ /* Else use the standard icon for the content type. */ - } else if (icon != NULL) - g_object_ref (icon); + } else if (icon != NULL) { + /* Nothing to do, just use the already reffed icon. */ /* Last ditch fallback. (GFileInfo not yet loaded?) */ - else + } else icon = g_themed_icon_new (DEFAULT_ICON_NAME); /* Pick an emblem, limit one. Choices listed by priority. */ |