aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-config.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@src.gnome.org>2000-06-02 06:20:29 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-06-02 06:20:29 +0800
commit8f4bcac53f23aa42a221f2105263a33521e77c85 (patch)
tree20a9d069f97b3d49ef3d54dbc53bf2ef817c3e42 /mail/mail-config.c
parent7e6624257538df294f3dbd5f717ceba0d6ab43ab (diff)
downloadgsoc2013-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.c17
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();