diff --git a/TCPServer.cpp b/TCPServer.cpp index 9506da3..474d356 100644 --- a/TCPServer.cpp +++ b/TCPServer.cpp @@ -927,7 +927,11 @@ void TCPServer::handleEmergency(int distance, double angle) { awaitRobotIdle();*/ } - this->gameThread.~thread(); + try { + this->gameThread.~thread(); + } catch (const std::exception& ex) { + std::cout << ex.what() << std::endl; + } this->gameStarted = false;