-LRN: Don't call a NULL StA function
authorChristian Grothoff <christian@grothoff.org>
Sun, 11 Mar 2012 14:54:07 +0000 (14:54 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sun, 11 Mar 2012 14:54:07 +0000 (14:54 +0000)
src/peerinfo-tool/gnunet-peerinfo.c

index 6902e605cb77fd450e0a0ce1b946a76130dab1a6..915e86bc2016956ba5231e6af36ccacb43e95c60 100644 (file)
@@ -519,7 +519,9 @@ add_addr_to_hello (void *cls, size_t max, void *buffer)
       return 0;
     return add_addr_to_hello (cls, max, buffer);
   }
-  if (GNUNET_OK == papi->string_to_address (papi->cls, &exp1[1], exp2 - &exp1[1], &addr, &addr_len))
+  if ((papi->string_to_address != NULL) && (GNUNET_OK ==
+      papi->string_to_address (papi->cls, &exp1[1], exp2 - &exp1[1], &addr,
+      &addr_len)))
   {
     struct GNUNET_HELLO_Address address;
     int ret;