[evolution/gnome-3-10] Bug #702958 - Crash on attachment add or remove
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-10] Bug #702958 - Crash on attachment add or remove
- Date: Fri, 17 Jan 2014 15:27:40 +0000 (UTC)
commit d516363539885597cc713c445e63c6b6e6fee253
Author: Milan Crha <mcrha redhat com>
Date: Fri Jan 17 16:24:42 2014 +0100
Bug #702958 - Crash on attachment add or remove
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 41a3423..d6719f3 100644
--- a/e-util/e-attachment.c
+++ b/e-util/e-attachment.c
@@ -335,6 +335,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);
}
@@ -352,11 +355,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. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]