- ModestConnectionSpecificSmtpEditWindowPrivate *priv =
- CONNECTION_SPECIFIC_SMTP_EDIT_WINDOW_GET_PRIVATE (window);
+ ModestConnectionSpecificSmtpEditWindowPrivate *priv = NULL;
+ ModestServerAccountData *result = NULL;
+ const gchar *outgoing_server = NULL;
+
+ priv = CONNECTION_SPECIFIC_SMTP_EDIT_WINDOW_GET_PRIVATE (window);
+ outgoing_server = gtk_entry_get_text (GTK_ENTRY (priv->entry_outgoingserver));
+
+ /* If the outgoing server is NULL, we are removing the connection specific
+ * settings */
+ if ((outgoing_server == NULL) || (outgoing_server[0] == '\0')) {
+ return NULL;
+ }