* src/widget/modest-attachments-view.c:
authorJose Dapena Paz <jdapena@igalia.com>
Wed, 20 Jun 2007 13:28:26 +0000 (13:28 +0000)
committerJose Dapena Paz <jdapena@igalia.com>
Wed, 20 Jun 2007 13:28:26 +0000 (13:28 +0000)
        * Crashed when there was an attached message with
          a NULL subject. Fixed (fixes NB#61283).

pmo-trunk-r2333

src/widgets/modest-attachments-view.c

index bc5f823..6d24531 100644 (file)
@@ -615,7 +615,11 @@ static void clipboard_get (GtkClipboard *clipboard, GtkSelectionData *selection_
                        if (TNY_IS_MSG (mime_part)) {
                                TnyHeader *header = tny_msg_get_header (TNY_MSG (mime_part));
                                if (TNY_IS_HEADER (header)) {
-                                       gtk_selection_data_set_text (selection_data, tny_header_get_subject (header), -1);
+                                       const gchar *subject = NULL;
+                                       subject = tny_header_get_subject (header);
+                                       if ((subject == NULL) || (subject[0] == '\0'))
+                                               subject = _("mail_va_no_subject");
+                                       gtk_selection_data_set_text (selection_data, subject, -1);
                                        g_object_unref (header);
                                }
                        } else {