Properly clean button_add_item ref in Dict property editor

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
This commit is contained in:
Haoyu Qiu 2022-05-19 19:20:59 +08:00 committed by Relintai
parent c819fe68dd
commit 9281e140dd

View File

@ -849,6 +849,7 @@ void EditorPropertyDictionary::update_property() {
if (vbox) { if (vbox) {
set_bottom_editor(nullptr); set_bottom_editor(nullptr);
memdelete(vbox); memdelete(vbox);
button_add_item = nullptr;
vbox = nullptr; vbox = nullptr;
} }
return; return;
@ -1182,6 +1183,7 @@ void EditorPropertyDictionary::update_property() {
if (vbox) { if (vbox) {
set_bottom_editor(nullptr); set_bottom_editor(nullptr);
memdelete(vbox); memdelete(vbox);
button_add_item = nullptr;
vbox = nullptr; vbox = nullptr;
} }
} }