From e43fa2d35d018955b4207f16504ae6d230332ac0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 15 Mar 2022 08:51:58 +0100 Subject: Properly clean `button_add_item` ref in Array/Dict property editors Fixes #59152. --- editor/editor_properties_array_dict.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp index 76d1ada820..f59ba66862 100644 --- a/editor/editor_properties_array_dict.cpp +++ b/editor/editor_properties_array_dict.cpp @@ -253,6 +253,7 @@ void EditorPropertyArray::update_property() { if (vbox) { set_bottom_editor(nullptr); memdelete(vbox); + button_add_item = nullptr; vbox = nullptr; } return; @@ -408,6 +409,7 @@ void EditorPropertyArray::update_property() { if (vbox) { set_bottom_editor(nullptr); memdelete(vbox); + button_add_item = nullptr; vbox = nullptr; } } @@ -816,6 +818,7 @@ void EditorPropertyDictionary::update_property() { if (vbox) { set_bottom_editor(nullptr); memdelete(vbox); + button_add_item = nullptr; vbox = nullptr; } return; @@ -1270,6 +1273,7 @@ void EditorPropertyLocalizableString::update_property() { if (vbox) { set_bottom_editor(nullptr); memdelete(vbox); + button_add_item = nullptr; vbox = nullptr; } return; -- cgit v1.2.3