# HG changeset patch
# User meillo@marmaro.de
# Date 1276938874 -7200
# Node ID 71ce3a1568e957f640f15eccb5055090bd990740
# Parent  e5090ac234cf0643d63b41029612733c796e84fb
moved check for NULL into destroy_message()

diff -r e5090ac234cf -r 71ce3a1568e9 src/message.c
--- a/src/message.c	Sat Jun 19 11:11:28 2010 +0200
+++ b/src/message.c	Sat Jun 19 11:14:34 2010 +0200
@@ -93,6 +93,10 @@
 {
 	GList *node;
 
+	if (!msg) {
+		return;
+	}
+
 	if (msg->uid)
 		g_free(msg->uid);
 	if (msg->ident)
diff -r e5090ac234cf -r 71ce3a1568e9 src/smtp_in.c
--- a/src/smtp_in.c	Sat Jun 19 11:11:28 2010 +0200
+++ b/src/smtp_in.c	Sat Jun 19 11:14:34 2010 +0200
@@ -321,17 +321,14 @@
 
 		case SMTP_QUIT:
 			smtp_printf(out, "221 goodbye\r\n");
-			if (msg) {
-				destroy_message(msg);
-			}
+			destroy_message(msg);
+			msg = NULL;
 			return;
 
 		case SMTP_RSET:
 			psc->from_seen = psc->rcpt_seen = FALSE;
-			if (msg) {
-				destroy_message(msg);
-				msg = NULL;
-			}
+			destroy_message(msg);
+			msg = NULL;
 			smtp_printf(out, "250 OK\r\n");
 			break;