From d54b60233ac0f61f1e89fbc42b62456714c081b8 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 1568bfd7bfd..af7435d35ad 100644 --- a/editor/editor_properties_array_dict.cpp +++ b/editor/editor_properties_array_dict.cpp @@ -820,6 +820,7 @@ void EditorPropertyDictionary::update_property() { if (vbox) { set_bottom_editor(nullptr); memdelete(vbox); + button_add_item = nullptr; vbox = nullptr; } return; @@ -1119,6 +1120,7 @@ void EditorPropertyDictionary::update_property() { if (vbox) { set_bottom_editor(nullptr); memdelete(vbox); + button_add_item = nullptr; vbox = nullptr; } }