From e0278314d347d83e28e8227fa3003a216ef35119 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 18 Jul 2015 10:53:20 +0100 Subject: [PATCH] console_handler: do not call a NULL function pointer The exit_handler can be NULL. --- contrib/epee/include/console_handler.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/epee/include/console_handler.h b/contrib/epee/include/console_handler.h index 8fe73ef4..5dd3eaba 100644 --- a/contrib/epee/include/console_handler.h +++ b/contrib/epee/include/console_handler.h @@ -304,7 +304,8 @@ namespace epee std::cout << usage; } } - exit_handler(); + if (exit_handler) + exit_handler(); return true; CATCH_ENTRY_L0("console_handler", false); }