diff options
author | Alan Fitton <ajf@eth0.org.uk> | 2011-09-30 21:08:42 +0000 |
---|---|---|
committer | Alan Fitton <ajf@eth0.org.uk> | 2011-09-30 21:08:42 +0000 |
commit | 607b8ae3d15b2b60dfb33777d6d6c0fd817ed05e (patch) | |
tree | 7bd19bdf906f460b8b80c350f45cba6281adcbf4 | |
parent | c58d08f4309ef5c9ac49b4eacb6abfd6a5cb77f3 (diff) |
issue 142
-rw-r--r-- | src/trg-destination-combo.c | 3 | ||||
-rw-r--r-- | src/util.c | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/trg-destination-combo.c b/src/trg-destination-combo.c index 4717637..976e3bb 100644 --- a/src/trg-destination-combo.c +++ b/src/trg-destination-combo.c @@ -145,7 +145,8 @@ static GObject *trg_destination_combo_constructor(GType type, trg_client_updateunlock(client); g_list_free(torrentItemRefs); - g_slist_str_set_add(&dirs, defaultDownDir, 0); + if (defaultDownDir) + g_slist_str_set_add(&dirs, defaultDownDir, 0); for (sli = dirs; sli; sli = g_slist_next(sli)) gtk_list_store_insert_with_values(comboModel, NULL, INT_MAX, 0, @@ -345,6 +345,9 @@ evutil_vsnprintf(char *buf, size_t buflen, const char *format, va_list ap) void rm_trailing_slashes(gchar *str) { + if (!str) + return; + int i, len; if ((len = strlen(str)) < 1) return; |