summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-03-15 08:51:58 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-03-15 08:52:02 +0100
commite43fa2d35d018955b4207f16504ae6d230332ac0 (patch)
tree92a7a2b8d2aa1f1ea55dfdd8f8146bbe3f5a0047
parente4b94063137c57a723c227856497f36d063b7903 (diff)
Properly clean `button_add_item` ref in Array/Dict property editors
Fixes #59152.
-rw-r--r--editor/editor_properties_array_dict.cpp4
1 files changed, 4 insertions, 0 deletions
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;