2007-08-17 Murray Cumming <murrayc@murrayc.com>
authorMurray Cumming <murrayc@murrayc.com>
Fri, 17 Aug 2007 15:20:59 +0000 (15:20 +0000)
committerMurray Cumming <murrayc@murrayc.com>
Fri, 17 Aug 2007 15:20:59 +0000 (15:20 +0000)
* src/modest-tny-send-queue.c: (modest_tny_send_queue_get_msg_id):
Check for NULLs to prevent a crash when opening an email that is
an attachment in another email, fixing projects.maemo.org bug
NB#66012.

pmo-trunk-r3012

ChangeLog2
src/modest-tny-send-queue.c

index bd7d787..cbb6b31 100644 (file)
@@ -1,5 +1,12 @@
 2007-08-17  Murray Cumming  <murrayc@murrayc.com>
 
+       * src/modest-tny-send-queue.c: (modest_tny_send_queue_get_msg_id):
+       Check for NULLs to prevent a crash when opening an email that is 
+       an attachment in another email, fixing projects.maemo.org bug 
+       NB#66012.
+
+2007-08-17  Murray Cumming  <murrayc@murrayc.com>
+
        * src/modest-ui-dimming-rules.c:
        (modest_ui_dimming_rules_on_view_window_move_to): 
        Enable the Move To toolbar button for search results, fixing the 
@@ -53,7 +60,7 @@
        Use modest_msg_view_window_new_for_search_result().
 
        * src/modest-ui-dimming-rules.c:
-       (modest_ui_dimming_rules_on_delete_msg): Dim the delete button 
+       (modest_ui_dimming_rules_on_delete_msg): Enable the delete button 
        for search results, fixing projects.maemo.org bug NB#63811.
 
 2007-08-16  Armin Burgmeier  <armin@openismus.com>
index 522a83a..eb4c1c3 100644 (file)
@@ -496,14 +496,18 @@ modest_tny_send_queue_get_msg_id (TnyHeader *header)
                
        /* Get message uid */
        uid = tny_header_get_uid (header);
-       tmp = g_strsplit (uid, "__", 2);
-       if (tmp[1] != NULL) 
-               msg_uid = g_strconcat (tmp[0], "_", NULL);
-       else 
-               msg_uid = g_strdup(tmp[0]);
-
-       /* free */
-       g_strfreev(tmp);
+       if (uid)
+               tmp = g_strsplit (uid, "__", 2);
+       
+       if (tmp) {
+               if (tmp[1] != NULL) 
+                       msg_uid = g_strconcat (tmp[0], "_", NULL);
+               else 
+                       msg_uid = g_strdup(tmp[0]);
+
+               /* free */
+               g_strfreev(tmp);
+       }
 
        return msg_uid;
 }