From e6cc388aa944114e901a941f4faeaff8ff035b04 Mon Sep 17 00:00:00 2001 From: Reinder Feenstra Date: Mon, 8 Jul 2024 22:58:19 +0200 Subject: [PATCH] fix: SIG SEGV when ECoS failed to connect see #150 --- server/src/hardware/protocol/ecos/kernel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/hardware/protocol/ecos/kernel.cpp b/server/src/hardware/protocol/ecos/kernel.cpp index ebcb88af..0e82414d 100644 --- a/server/src/hardware/protocol/ecos/kernel.cpp +++ b/server/src/hardware/protocol/ecos/kernel.cpp @@ -184,7 +184,7 @@ void Kernel::stop(Simulation* simulation) m_thread.join(); - if(simulation) // get simulation data + if(simulation && !m_objects.empty()) // get simulation data { simulation->clear();