summaryrefslogtreecommitdiff
path: root/src/trg-client.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2011-09-03 09:38:07 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2011-09-03 09:38:07 +0000
commitdca8f6d8b87d6f92ff21344ec80b64c7a3b7de7f (patch)
tree6c68870720273373decf63e56ea122e8246ee12d /src/trg-client.c
parent49beef1defd12ed621bb712fb81cd78248da44f2 (diff)
issue 76 - as stated in the documentation gtk_window_get_size() isn't always up to date. I'm sure it worked when I implemented this on GNOME, so as the docs suggest I think behavior could vary on other window managers. I'm on XFCE now and it doesn't work. use the configure-event to save the size instead.
Diffstat (limited to 'src/trg-client.c')
-rw-r--r--src/trg-client.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/trg-client.c b/src/trg-client.c
index 244361e..fb57a93 100644
--- a/src/trg-client.c
+++ b/src/trg-client.c
@@ -176,8 +176,12 @@ int trg_client_populate_with_settings(TrgClient * tc)
trg_prefs_get_int(prefs, TRG_PREFS_KEY_PORT, TRG_PREFS_PROFILE);
host = trg_prefs_get_string(prefs, TRG_PREFS_KEY_HOSTNAME, TRG_PREFS_PROFILE);
- if (!host || strlen(host) < 1)
+ if (!host) {
return TRG_NO_HOSTNAME_SET;
+ } else if (strlen(host) < 1) {
+ free(host);
+ return TRG_NO_HOSTNAME_SET;
+ }
priv->ssl = trg_prefs_get_bool(prefs, TRG_PREFS_KEY_SSL, TRG_PREFS_PROFILE);