fix rare NPE

This commit is contained in:
Christian Grothoff 2021-04-14 15:24:15 +02:00
parent b7ef3cfd36
commit 084a5f6685
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC

View File

@ -1024,6 +1024,8 @@ create_key (void)
static struct GNUNET_TIME_Absolute
key_action_time (void)
{
if (NULL == keys_head)
return GNUNET_TIME_UNIT_ZERO_ABS;
return GNUNET_TIME_absolute_min (
GNUNET_TIME_absolute_add (keys_head->anchor,
duration),