From 4ece9c192cebed7a3cf195f377a8e86da1f726e3 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 19 Apr 2015 23:31:24 +0200 Subject: [PATCH] fix NPE --- src/mint/taler-mint-httpd_keystate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mint/taler-mint-httpd_keystate.c b/src/mint/taler-mint-httpd_keystate.c index 6da2ebbee..8901f33d5 100644 --- a/src/mint/taler-mint-httpd_keystate.c +++ b/src/mint/taler-mint-httpd_keystate.c @@ -399,7 +399,8 @@ TMH_KS_acquire (void) struct TALER_MintSignatureP sig; GNUNET_assert (0 == pthread_mutex_lock (&internal_key_state_mutex)); - if (internal_key_state->next_reload.abs_value_us <= now.abs_value_us) + if ( (NULL != internal_key_state) && + (internal_key_state->next_reload.abs_value_us <= now.abs_value_us) ) { TMH_KS_release (internal_key_state); internal_key_state = NULL;