From 013c10c489b13ebb9e82eae43b811dcaf5514a17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Poderoso?= <120394830+JesusPoderoso@users.noreply.github.com> Date: Thu, 19 Sep 2024 07:48:05 +0200 Subject: [PATCH] Fix xtypes example segfault if xml env var is not set (#5243) Signed-off-by: JesusPoderoso --- examples/cpp/xtypes/PublisherApp.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/cpp/xtypes/PublisherApp.cpp b/examples/cpp/xtypes/PublisherApp.cpp index b4ac99fced6..52c4006b42c 100644 --- a/examples/cpp/xtypes/PublisherApp.cpp +++ b/examples/cpp/xtypes/PublisherApp.cpp @@ -242,6 +242,7 @@ DynamicType::_ref_type PublisherApp::create_type( { std::cout << "Error getting dynamic type \"HelloWorld\"." << std::endl; + return nullptr; } } else