* src/modest-text-utils.c
[modest] / src / modest-tny-send-queue.c
index 281699c..eb4c1c3 100644 (file)
@@ -35,6 +35,7 @@
 #include <tny-camel-msg.h>
 #include <modest-tny-account.h>
 #include <modest-runtime.h>
+#include <modest-platform.h>
 #include <widgets/modest-window-mgr.h>
 #include <modest-marshal.h>
 #include <string.h> /* strcmp */
@@ -495,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;
 }
@@ -566,6 +571,8 @@ _on_msg_has_been_sent (TnySendQueue *self,
        g_queue_delete_link (priv->queue, item);
        priv->current = NULL;
 
+       modest_platform_information_banner (NULL, NULL, _("mcen_ib_message_sent"));
+
        /* free */
        g_free(msg_id);
 }