2007-08-13 Murray Cumming <murrayc@murrayc.com>
authorMurray Cumming <murrayc@murrayc.com>
Mon, 13 Aug 2007 13:46:55 +0000 (13:46 +0000)
committerMurray Cumming <murrayc@murrayc.com>
Mon, 13 Aug 2007 13:46:55 +0000 (13:46 +0000)
* src/widgets/modest-header-view-render.c:
(_modest_header_view_compact_header_cell_data):
NULL some strings after freeing them, trying to deal with
the double deletion found in projects.maemo.org bug 64183,
probably having no effect.

pmo-trunk-r2968

ChangeLog2
src/widgets/modest-header-view-render.c

index 962f6c1..0778602 100644 (file)
@@ -1,5 +1,13 @@
 2007-08-13  Murray Cumming  <murrayc@murrayc.com>
 
+       * src/widgets/modest-header-view-render.c:
+       (_modest_header_view_compact_header_cell_data):
+       NULL some strings after freeing them, trying to deal with 
+       the double deletion found in projects.maemo.org bug 64183, 
+       probably having no effect.
+
+2007-08-13  Murray Cumming  <murrayc@murrayc.com>
+
        * src/maemo/modest-account-settings-dialog.c:
        (create_page_incoming), (create_page_outgoing): Use a define 
        for the min and max port numbers.
index 6226751..cbe0051 100644 (file)
@@ -323,22 +323,27 @@ _modest_header_view_compact_header_cell_data  (GtkTreeViewColumn *column,  GtkCe
        else
                g_object_set (G_OBJECT (priority_cell), "pixbuf",
                              NULL, NULL);
+                             
        header = g_markup_printf_escaped ("%s", (subject && strlen (subject)) ? subject : _("mail_va_no_subject"));
        g_free (subject);
+       subject = NULL;
        g_object_set (G_OBJECT (subject_cell), "markup", header, NULL);
        g_free (header);
+       header = NULL;
        set_common_flags (subject_cell, flags);
 
 
-       /* fixme: we hardcode the color to #666666; instead we should use SecundaryTextColour from the
+       /* fixme: we hardcode the color to #666666; instead we should use SecondaryTextColour from the
         * theme (gtkrc file) */
        
        header = g_markup_printf_escaped ("<span size='small' foreground='#666666'>%s</span>", modest_text_utils_get_display_address (address));
        g_free (address);
+       address = NULL;
        g_object_set (G_OBJECT (recipient_cell),
                      "markup", header,
                      NULL);
        g_free (header);
+       header = NULL;
        set_common_flags (recipient_cell, flags);
 
        if (header_mode == MODEST_HEADER_VIEW_COMPACT_HEADER_MODE_OUTBOX) {
@@ -353,12 +358,14 @@ _modest_header_view_compact_header_cell_data  (GtkTreeViewColumn *column,  GtkCe
 /*                     if (prior_flags == TNY_HEADER_FLAG_SUSPENDED_PRIORITY) */
 /*                             status = MODEST_TNY_SEND_QUEUE_SUSPENDED; */
                }
+               
                status_str = get_status_string (status);
                display_date = g_strdup_printf("<span size='small' foreground='#666666'>%s</span>", status_str);
                g_object_set (G_OBJECT (date_or_status_cell),
                              "markup", display_date,
                              NULL);
                g_free (display_date);
+               display_date = NULL;
        } else {
                /* in some rare cases, mail might have no Date: field. it case,
                 * don't show the date, instead of bogus 1/1/1970
@@ -373,10 +380,14 @@ _modest_header_view_compact_header_cell_data  (GtkTreeViewColumn *column,  GtkCe
                              "markup", display_date,
                              NULL);
                g_free (tmp_date);
+               tmp_date = NULL;
                g_free (display_date);
+               display_date = NULL;
        }
+       
        if (msg_header != NULL)
                g_object_unref (msg_header);
+               
        set_common_flags (date_or_status_cell, flags);
 }