Fix CID 1491296, 1491368, 1491288 and 1491322: dereference before null check.
[claws.git] / src / plugins / notification / notification_trayicon.c
index 7f290a104e3c5b8c174b0ab8ca550a8bfb1ca844..51dfe18194de00d45151c6c72d3f37648b5a535e 100644 (file)
@@ -896,10 +896,10 @@ static gchar* notification_trayicon_popup_assemble_body(MsgInfo *msginfo)
 
       /* Make sure text is valid UTF8 */
       utf8_str = notification_validate_utf8_str(text);
-      g_free(text);
 
-      if(from) g_free(from);
-      if(subj) g_free(subj);
+      g_free(text);
+      g_free(from);
+      g_free(subj);
          if(foldname) g_free(foldname);
     }
     else if(popup.num_calendar) {