From abd69f08adc08989436209f97a633707947e70c7 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Mon, 16 Oct 2000 23:22:26 +0000 Subject: only set the url->user field if the user string is non-NULL and not empty. 2000-10-16 Chris Toshok * mail-config-gui.c (service_page_get_url): only set the url->user field if the user string is non-NULL and not empty. svn path=/trunk/; revision=5953 --- mail/mail-config-gui.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'mail/mail-config-gui.c') diff --git a/mail/mail-config-gui.c b/mail/mail-config-gui.c index 67ad633771..34560647ac 100644 --- a/mail/mail-config-gui.c +++ b/mail/mail-config-gui.c @@ -583,8 +583,16 @@ service_page_get_url (MailDialogServicePage *page) url = g_new0 (CamelURL, 1); url->protocol = g_strdup (spitem->protocol); - if (spitem->user) - url->user = e_utf8_gtk_editable_get_chars (GTK_EDITABLE (spitem->user), 0, -1); + if (spitem->user) { + char *user = e_utf8_gtk_editable_get_chars (GTK_EDITABLE (spitem->user), 0, -1); + if (user && *user) { + url->user = user; + } + else { + url->user = NULL; + g_free (user); + } + } if (spitem->host) { char *p; -- cgit