diff options
author | Jeffrey Stedfast <fejj@src.gnome.org> | 2000-06-02 06:20:29 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2000-06-02 06:20:29 +0800 |
commit | 8f4bcac53f23aa42a221f2105263a33521e77c85 (patch) | |
tree | 20a9d069f97b3d49ef3d54dbc53bf2ef817c3e42 /mail/mail-config.c | |
parent | 7e6624257538df294f3dbd5f717ceba0d6ab43ab (diff) | |
download | gsoc2013-evolution-8f4bcac53f23aa42a221f2105263a33521e77c85.tar gsoc2013-evolution-8f4bcac53f23aa42a221f2105263a33521e77c85.tar.gz gsoc2013-evolution-8f4bcac53f23aa42a221f2105263a33521e77c85.tar.bz2 gsoc2013-evolution-8f4bcac53f23aa42a221f2105263a33521e77c85.tar.lz gsoc2013-evolution-8f4bcac53f23aa42a221f2105263a33521e77c85.tar.xz gsoc2013-evolution-8f4bcac53f23aa42a221f2105263a33521e77c85.tar.zst gsoc2013-evolution-8f4bcac53f23aa42a221f2105263a33521e77c85.zip |
fixed a segfault in service_acceptable()
in mail-config.c
svn path=/trunk/; revision=3341
Diffstat (limited to 'mail/mail-config.c')
-rw-r--r-- | mail/mail-config.c | 17 |
1 files changed, 10 insertions, 7 deletions
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(); |