diff options
-rw-r--r-- | mail/ChangeLog | 2 | ||||
-rw-r--r-- | mail/mail-config.c | 17 |
2 files changed, 12 insertions, 7 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index a6e96cced4..5d003485f3 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,6 +1,8 @@ 2000-06-01 Jeffrey Stedfast <fejj@helixcode.com> * mail-config.c: Config dialogs are completed. + (service_acceptable): Fixed a segfault caused by duplicate + camel_exception_free() * folder-browser-factory.c: Renamed Tool/ menu items Vfolder was changed to Virtual Folder and diff --git a/mail/mail-config.c b/mail/mail-config.c index 2aa80553aa..8b6692f64e 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -612,20 +612,23 @@ service_acceptable (GtkNotebook *notebook) url = get_service_url (GTK_OBJECT (table)); ex = camel_exception_new (); + camel_exception_clear (ex); service = camel_session_get_service (session, url, type, ex); g_free (url); + if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) goto error; ok = camel_service_connect (service, ex); - if (ok) - camel_service_disconnect (service, ex); - gtk_object_unref (GTK_OBJECT (service)); - - camel_exception_free (ex); - if (ok) + if (ok) { + camel_service_disconnect (service, ex); + gtk_object_unref (GTK_OBJECT (service)); + camel_exception_free (ex); return TRUE; + } + + gtk_object_unref (GTK_OBJECT (service)); error: error_dialog (GTK_WIDGET (notebook), camel_exception_get_description (ex)); @@ -1623,7 +1626,7 @@ on_cmdCamelServicesOK_clicked (GtkButton *button, gpointer user_data) if (service_acceptable (GTK_NOTEBOOK (interior_notebook))) { destroy_service (GTK_OBJECT (interior_notebook), (gpointer) &transport); - gtk_widget_destroy(GTK_WIDGET (user_data)); + gtk_widget_destroy (GTK_WIDGET (user_data)); } write_config(); |