sig int handler check if pointer is not null
This commit is contained in:
2024-08-27 11:10:41 +02:00
parent 7656402ae9
commit 2df1c67a52
+1
View File
@@ -41,6 +41,7 @@ void int_handler(int s)
g_out << "Caught Ctrl + C" << std::endl;
if (g_web_socket != nullptr)
g_web_socket->stop();
if (g_simulators != nullptr)
g_simulators->stop();
g_out << "Shutting down." << std::endl;
// delay to allow the server to stop gracefully