File evolution-bsc1049387.patch of Package evolution.openSUSE_Leap_42.3_Update
diff --git a/mail/e-mail-autoconfig.c b/mail/e-mail-autoconfig.c
index c7cc0b3daa..2a034f10ed 100644
--- a/mail/e-mail-autoconfig.c
+++ b/mail/e-mail-autoconfig.c
@@ -684,7 +684,9 @@ mail_autoconfig_initable_init (GInitable *initable,
cp++;
}
- if (local_error != NULL)
+ if (!success && !local_error)
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, _("Unknown error"));
+ else if (local_error)
g_propagate_error (error, local_error);
g_free (name_server);
diff --git a/mail/e-mail-config-assistant.c b/mail/e-mail-config-assistant.c
index 3363c21fd2..f4d5b83d97 100644
--- a/mail/e-mail-config-assistant.c
+++ b/mail/e-mail-config-assistant.c
@@ -292,9 +292,10 @@ mail_config_assistant_autoconfigure_cb (GObject *source_object,
/* We don't really care about errors, we only capture the GError
* as a debugging aid. If this doesn't work we simply proceed to
* the Receiving Email page. */
- if (error != NULL) {
+ if (error || !E_IS_MAIL_AUTOCONFIG (autoconfig)) {
gtk_assistant_next_page (context->assistant);
- g_error_free (error);
+ g_clear_object (&autoconfig);
+ g_clear_error (&error);
goto exit;
}