-fix 2034, request can be cancelled in which case rh might be NULL here
authorChristian Grothoff <christian@grothoff.org>
Sun, 25 Dec 2011 16:46:16 +0000 (16:46 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sun, 25 Dec 2011 16:46:16 +0000 (16:46 +0000)
src/fs/gnunet-service-fs_pr.c

index 5ebca1ad78806ba8442975e69ce3ee9a6faf92d7..dcaba1203e48fafbff03b1b3ed4d596003b098eb 100644 (file)
@@ -358,9 +358,10 @@ GSF_pending_request_create_ (enum GSF_PendingRequestOptions options,
       GNUNET_assert (dpr != NULL);
       if (pr == dpr)
         break;                  /* let the request live briefly... */
-      dpr->rh (dpr->rh_cls, GNUNET_BLOCK_EVALUATION_REQUEST_VALID, dpr,
-               UINT32_MAX, GNUNET_TIME_UNIT_FOREVER_ABS, GNUNET_BLOCK_TYPE_ANY,
-               NULL, 0);
+      if (NULL != dpr->rh)
+       dpr->rh (dpr->rh_cls, GNUNET_BLOCK_EVALUATION_REQUEST_VALID, dpr,
+                UINT32_MAX, GNUNET_TIME_UNIT_FOREVER_ABS, GNUNET_BLOCK_TYPE_ANY,
+                NULL, 0);
       GSF_pending_request_cancel_ (dpr, GNUNET_YES);
     }
   }