]> sjero.net Git - wget/commitdiff
[svn] Oops! Fix braino in recur.c -- clear the hash tables only when
authorhniksic <devnull@localhost>
Sat, 31 Mar 2001 02:21:20 +0000 (18:21 -0800)
committerhniksic <devnull@localhost>
Sat, 31 Mar 2001 02:21:20 +0000 (18:21 -0800)
they are defined.

src/ChangeLog
src/recur.c

index 2151a0b3be78e91f834bb90fe3ede9fd4322f25d..b4dc7e09c8faddd2964880a16214165612907a25 100644 (file)
@@ -1,3 +1,8 @@
+2001-03-31  Hrvoje Niksic  <hniksic@arsdigita.com>
+
+       * recur.c (recursive_retrieve): Clear the hash tables only when
+       they are defined.
+
 2001-03-31  Hrvoje Niksic  <hniksic@arsdigita.com>
 
        * http.c (gethttp): Make sure the socket is closed with
index ba2115cf6873196d9d4fc80403a64d202bc8cadf..1734530df7f84f3f36cb625bb6b582e1a7b42786 100644 (file)
@@ -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);