From 4b1f240c212966ad43587167f2b747150e94f4fd Mon Sep 17 00:00:00 2001 From: v4hn Date: Fri, 2 Jul 2021 12:37:17 +0200 Subject: [PATCH] test_container: correctly initialize robot_model The local mocks do not care, but leaving a dangling nullptr leads to segfaults with refactoring/new tests. :-) --- core/test/test_container.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/test/test_container.cpp b/core/test/test_container.cpp index a9e81ffc..50f91936 100644 --- a/core/test/test_container.cpp +++ b/core/test/test_container.cpp @@ -196,7 +196,7 @@ protected: Container container; InterfacePtr dummy; - InitTest() : ::testing::Test(), dummy(new Interface) {} + InitTest() : ::testing::Test{}, robot_model{ getModel() }, dummy{ new Interface } {} void pushInterface(bool start = true, bool end = true) { // pretend, that the container is connected