diff --git a/src/ChangeLog b/src/ChangeLog index 2151a0b3..b4dc7e09 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2001-03-31 Hrvoje Niksic + + * recur.c (recursive_retrieve): Clear the hash tables only when + they are defined. + 2001-03-31 Hrvoje Niksic * http.c (gethttp): Make sure the socket is closed with diff --git a/src/recur.c b/src/recur.c index ba2115cf..1734530d 100644 --- a/src/recur.c +++ b/src/recur.c @@ -157,8 +157,10 @@ recursive_retrieve (const char *file, const char *this_url) hash_table_clear (undesirable_urls); string_set_add (undesirable_urls, this_url); - hash_table_clear (dl_file_url_map); - hash_table_clear (dl_url_file_map); + if (dl_file_url_map) + hash_table_clear (dl_file_url_map); + if (dl_url_file_map) + hash_table_clear (dl_url_file_map); /* Enter this_url to the hash table, in original and "enhanced" form. */ u = newurl (); err = parseurl (this_url, u, 0);