From bd6400ca442b1ee2d4deb6fede68c00e70999d9e Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 9 Aug 2024 09:48:11 +0200 Subject: editor: now use bptr::destroy() --- editor/imgui.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'editor/imgui.cpp') diff --git a/editor/imgui.cpp b/editor/imgui.cpp index 2923c3ea..4fadfe44 100644 --- a/editor/imgui.cpp +++ b/editor/imgui.cpp @@ -338,7 +338,7 @@ void app::do_popup_menu() { const auto [id, target] = _popup_target; auto& w = M->world(); - const auto eʹ = w.find_object(id); + auto eʹ = w.find_object(id); if (target == popup_target_type::none || !eʹ) { @@ -394,6 +394,7 @@ void app::do_popup_menu() e.chunk().remove_object(e.index()); e.destroy_script_post(); e.gone = true; + eʹ.destroy(); } } else -- cgit v1.2.3