fix crash
authorChristian Grothoff <christian@grothoff.org>
Wed, 23 Dec 2009 07:49:53 +0000 (07:49 +0000)
committerChristian Grothoff <christian@grothoff.org>
Wed, 23 Dec 2009 07:49:53 +0000 (07:49 +0000)
src/peerinfo/gnunet-peerinfo.c

index 3ade1468f4ddd6a43168cb9904724f9454ac08d9..b5f41cc59d00aecfe820ee9610d5c4f2dd6ed027 100644 (file)
@@ -50,6 +50,10 @@ print_peer_info (void *cls,
 
   /* FIXME: add printing of address information!
      => need extended transport API! */
+  if (peer == NULL)
+    {
+      return;    
+    }
   GNUNET_CRYPTO_hash_to_enc (&peer->hashPubKey, &enc);
   if (be_quiet)
     printf ("%s\n", (const char *) &enc);