Fixes FwNULL 4/16
[modest] / src / hildon2 / modest-msg-view-window.c
index 49598d3..f34f2b6 100644 (file)
@@ -2427,15 +2427,8 @@ on_decode_to_stream_async_handler (TnyMimePart *mime_part,
 
        if (cancelled || err) {
                if (err) {
-                       if ((err->domain == TNY_ERROR_DOMAIN) &&
-                           (err->code == TNY_IO_ERROR_WRITE) &&
-                           (errno == ENOSPC)) {
-                               modest_platform_information_banner (NULL, NULL,
-                                                                   _KR("cerm_device_memory_full"));
-                       } else {
-                               modest_platform_information_banner (NULL, NULL, 
-                                                                   _("mail_ib_file_operation_failed"));
-                       }
+                       modest_platform_information_banner (NULL, NULL,
+                                                           _KR("cerm_device_memory_full"));
                }
                goto free;
        }
@@ -2488,7 +2481,8 @@ modest_msg_view_window_view_attachment (ModestMsgViewWindow *window,
                        mime_part = (TnyMimePart *) tny_iterator_get_current (iter);
                        g_object_unref (iter);
                }
-               g_object_unref (selected_attachments);
+               if (selected_attachments)
+                       g_object_unref (selected_attachments);
 
                if (error)
                        goto frees;