[evolution-rss] don't crash on freeing category



commit 55c802dcad2fee7a1f97e10f7d96974726afb845
Author: Lucian Langa <lucilanga gnome org>
Date:   Thu Feb 26 00:37:38 2015 +0100

    don't crash on freeing category

 src/e-mail-formatter-evolution-rss.c |   36 +---------------------------------
 src/rss.c                            |    3 +-
 2 files changed, 3 insertions(+), 36 deletions(-)
---
diff --git a/src/e-mail-formatter-evolution-rss.c b/src/e-mail-formatter-evolution-rss.c
index 6abfcdd..ece76ad 100644
--- a/src/e-mail-formatter-evolution-rss.c
+++ b/src/e-mail-formatter-evolution-rss.c
@@ -313,41 +313,7 @@ emfe_evolution_rss_format (EMailFormatterExtension *extension,
                hd->content = rss_process_website(content->str, website);
                hd->website = website;
 
-       /*      str = g_strdup_printf (
-                       "<div style=\"border: solid #%06x 1px; background-color: #%06x; color: #%06x;\">\n",
-                       frame_col & 0xffffff,
-                       cont_col & 0xffffff,
-                       text_col & 0xffffff);
-               camel_stream_write_string (stream, str, NULL, NULL);
-               g_free (str);
-               str = g_strdup_printf (
-                       "<div style=\"border: solid 0px; background-color: #%06x; padding: 2px; color: 
#%06x;\">"
-                       "<b><font size=+1><a href=%s>%s</a></font></b></div>",
-                       cont_col & 0xEDECEB & 0xffffff,
-                       text_col & 0xffffff,
-                       website, subject);
-               camel_stream_write_string (stream, str, NULL, NULL);
-               if (category) {
-                       str = g_strdup_printf (
-                               "<div style=\"border: solid 0px; background-color: #%06x; padding: 2px; 
color: #%06x;\">"
-                               "<b><font size=-1>%s: %s</font></b></div>",
-                               cont_col & 0xEDECEB & 0xffffff,
-                               text_col & 0xffffff,
-                               _("Posted under"), category);
-                       camel_stream_write_string (stream, str, NULL, NULL);
-                       g_free (str);
-               }
-
-               str = g_strdup_printf (
-                       "<div style=\"border: solid #%06x 0px; background-color: #%06x; padding: 2px; color: 
#%06x;\">"
-                       "%s</div></div>",
-                       frame_col & 0xffffff,
-                       cont_col & 0xffffff,
-                       text_col & 0xffffff,
-                       buff);
-               camel_stream_write_string (stream, buff, NULL, NULL);*/
-//             g_free (str);
-       g_idle_add((GSourceFunc)feed_async, hd);
+               g_idle_add((GSourceFunc)feed_async, hd);
        }
 
 success:g_object_unref(message);
diff --git a/src/rss.c b/src/rss.c
index 54e3f96..73ba7e6 100644
--- a/src/rss.c
+++ b/src/rss.c
@@ -4165,7 +4165,8 @@ out:
 #else
                camel_medium_set_content_object(CAMEL_MEDIUM(new), CAMEL_DATA_WRAPPER(rtext));
 #endif
-       g_string_free(cats, TRUE);
+       if (CF->category)
+               g_string_free(cats, TRUE);
 
 #if (DATASERVER_VERSION >= 2033001)
        camel_folder_append_message_sync (mail_folder, new, info,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]