fix crash
authorChristian Grothoff <christian@grothoff.org>
Fri, 2 Apr 2010 20:08:41 +0000 (20:08 +0000)
committerChristian Grothoff <christian@grothoff.org>
Fri, 2 Apr 2010 20:08:41 +0000 (20:08 +0000)
src/fs/gnunet-directory.c

index de4ccdd3fbd7eb24e60ab169e901eeb8d8e57f74..c1a7c78f3776ff5b0087084e0c508aa42cc042c2 100644 (file)
@@ -84,6 +84,15 @@ print_entry (void *cls,
 {
   char *string;
 
+  if (uri == NULL)
+    {
+      printf (_("Directory summary:\n"));
+      GNUNET_CONTAINER_meta_data_iterate (meta,
+                                         &item_printer,
+                                         NULL);
+      printf ("\n");
+      return;
+    }
   string = GNUNET_FS_uri_to_string (uri);
   printf ("%s:\n", string);
   GNUNET_free (string);