#include <tny-simple-list.h>
#include <tny-folder.h>
#include <modest-runtime.h>
+#include <modest-defs.h>
#include "modest-formatter.h"
#include <tny-camel-mem-stream.h>
#include <tny-camel-mime-part.h>
if (part && !g_strcasecmp (tny_mime_part_get_content_type (part), "multipart/related")) {
related_part = part;
break;
- } else {
- g_object_unref (part);
}
+ if (part)
+ g_object_unref (part);
tny_iterator_next (iter);
}
g_object_unref (iter);
g_list_foreach (attachments_list, (GFunc) g_object_unref, NULL);
g_list_free (attachments_list);
}
- if (parts)
- g_object_unref (G_OBJECT (parts));
+ g_object_unref (parts);
/* Fill the header */
if (header)