diff options
-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; |