From 9281e140dd76aa05e4fef9bd2737495d6c300ba0 Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Thu, 19 May 2022 19:20:59 +0800 Subject: [PATCH] Properly clean `button_add_item` ref in Dict property editor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: RĂ©mi Verschelde --- editor/editor_properties_array_dict.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp index 69b2e6803..0494d05d7 100644 --- a/editor/editor_properties_array_dict.cpp +++ b/editor/editor_properties_array_dict.cpp @@ -849,6 +849,7 @@ void EditorPropertyDictionary::update_property() { if (vbox) { set_bottom_editor(nullptr); memdelete(vbox); + button_add_item = nullptr; vbox = nullptr; } return; @@ -1182,6 +1183,7 @@ void EditorPropertyDictionary::update_property() { if (vbox) { set_bottom_editor(nullptr); memdelete(vbox); + button_add_item = nullptr; vbox = nullptr; } }