aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-config-gui.c
diff options
context:
space:
mode:
authorChris Toshok <toshok@helixcode.com>2000-10-17 07:22:26 +0800
committerChris Toshok <toshok@src.gnome.org>2000-10-17 07:22:26 +0800
commitabd69f08adc08989436209f97a633707947e70c7 (patch)
tree0561f1e1b11d1405ac0f111521997cd0b4b7ded0 /mail/mail-config-gui.c
parent5da3981c901271b379b80705dbd598b3965baf2d (diff)
downloadgsoc2013-evolution-abd69f08adc08989436209f97a633707947e70c7.tar.gz
gsoc2013-evolution-abd69f08adc08989436209f97a633707947e70c7.tar.zst
gsoc2013-evolution-abd69f08adc08989436209f97a633707947e70c7.zip
only set the url->user field if the user string is non-NULL and not empty.
2000-10-16 Chris Toshok <toshok@helixcode.com> * 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
Diffstat (limited to 'mail/mail-config-gui.c')
-rw-r--r--mail/mail-config-gui.c12
1 files changed, 10 insertions, 2 deletions
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;