From f1e7d5401d8a211e8cfc9f7928628b0229a59302 Mon Sep 17 00:00:00 2001 From: Frederick Roy Date: Thu, 9 Nov 2023 14:57:49 +0900 Subject: [PATCH] fix typo --- SofaImGui/bindings/Module_SofaImGui.cpp | 2 +- SofaImGui/src/SofaImGui/ImGuiGUI.cpp | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/SofaImGui/bindings/Module_SofaImGui.cpp b/SofaImGui/bindings/Module_SofaImGui.cpp index c79df42073..d10ef75141 100644 --- a/SofaImGui/bindings/Module_SofaImGui.cpp +++ b/SofaImGui/bindings/Module_SofaImGui.cpp @@ -20,7 +20,7 @@ #include -#include +#include namespace py { using namespace pybind11; } diff --git a/SofaImGui/src/SofaImGui/ImGuiGUI.cpp b/SofaImGui/src/SofaImGui/ImGuiGUI.cpp index 2f7a73e2fe..4ec99a8821 100644 --- a/SofaImGui/src/SofaImGui/ImGuiGUI.cpp +++ b/SofaImGui/src/SofaImGui/ImGuiGUI.cpp @@ -49,8 +49,11 @@ sofa::gui::common::BaseGUI* ImGuiGUI::CreateGUI(const char* name, sofa::simulati { return nullptr; } - - gui->setScene(groot, filename); + + if(groot) + { + gui->setScene(groot, filename); + } return gui; }