Index: modules/settings/e-settings-mail-formatter.c
===================================================================
--- modules/settings/e-settings-mail-formatter.c	(revision 11)
+++ modules/settings/e-settings-mail-formatter.c	(working copy)
@@ -67,13 +67,13 @@ settings_mail_formatter_headers_changed_cb (GSetti
 	if (key) {
 		GSList *link;
 
-		for (ii = 0, link = extension->priv->old_headers; headers && headers[ii]; ii++, link = g_slist_next (link)) {
+		for (ii = 0, link = extension->priv->old_headers; link && headers && headers[ii]; ii++, link = g_slist_next (link)) {
 			if (g_strcmp0 (link->data, headers[ii]) != 0)
 				break;
 		}
 
 		/* both lists are read to the end, thus they are the same */
-		if (!headers[ii] && !link) {
+		if ((!headers || !headers[ii]) && !link) {
 			g_strfreev (headers);
 			return;
 		}
