From 8f8c35fbb9174c5a55cd6af460fecc599fc81ab8 Mon Sep 17 00:00:00 2001 From: Luca Della Vedova Date: Fri, 2 Aug 2024 09:36:29 +0800 Subject: [PATCH] Fix reference file name being kept when loading new building (#501) Signed-off-by: Luca Della Vedova --- rmf_traffic_editor/gui/building.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rmf_traffic_editor/gui/building.cpp b/rmf_traffic_editor/gui/building.cpp index 872a53ca..e38b7a0c 100644 --- a/rmf_traffic_editor/gui/building.cpp +++ b/rmf_traffic_editor/gui/building.cpp @@ -96,6 +96,8 @@ bool Building::load(const string& _filename) if (y["reference_level_name"]) reference_level_name = y["reference_level_name"].as(); + else + reference_level_name = ""; // crowd_sim_impl is initialized when creating crowd_sim_table in editor.cpp // just in case the pointer is not initialized