From 3233195d2d6c4733e6c98e754c54902f9c6d657c Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 22 May 2022 13:11:09 +0200 Subject: -fix NPE --- src/testing/testing_api_loop.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/testing/testing_api_loop.c') diff --git a/src/testing/testing_api_loop.c b/src/testing/testing_api_loop.c index 7b1387b59..1ea1d5a26 100644 --- a/src/testing/testing_api_loop.c +++ b/src/testing/testing_api_loop.c @@ -274,8 +274,9 @@ do_shutdown (void *cls) for (unsigned int j = 0; NULL != (cmd = &is->commands[j])->label; j++) - cmd->cleanup (cmd->cls, - cmd); + if (NULL != cmd->cleanup) + cmd->cleanup (cmd->cls, + cmd); if (NULL != is->exchange) { TALER_LOG_DEBUG ("Disconnecting the exchange\n"); -- cgit v1.2.3