summaryrefslogtreecommitdiff
path: root/src/testing/testing_api_loop.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-05-22 13:11:09 +0200
committerChristian Grothoff <christian@grothoff.org>2022-05-22 13:11:09 +0200
commit3233195d2d6c4733e6c98e754c54902f9c6d657c (patch)
treed452cce87901829258e5dc8bca04e4bd3e4b5d8a /src/testing/testing_api_loop.c
parentb1b943aa3eb1fd96a2b265aa02dd455da2e9f431 (diff)
downloadexchange-3233195d2d6c4733e6c98e754c54902f9c6d657c.tar.gz
exchange-3233195d2d6c4733e6c98e754c54902f9c6d657c.tar.bz2
exchange-3233195d2d6c4733e6c98e754c54902f9c6d657c.zip
-fix NPE
Diffstat (limited to 'src/testing/testing_api_loop.c')
-rw-r--r--src/testing/testing_api_loop.c5
1 files changed, 3 insertions, 2 deletions
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");