Fix crash when reverting an exported array / dict to NULL

This commit is contained in:
Paulb23 2019-09-21 16:36:30 +01:00
parent 2e065d8ad0
commit c3d712f414
1 changed files with 4 additions and 0 deletions

View File

@ -264,7 +264,9 @@ void EditorPropertyArray::update_property() {
edit->set_text(String("(Nil) ") + arrtype); edit->set_text(String("(Nil) ") + arrtype);
edit->set_pressed(false); edit->set_pressed(false);
if (vbox) { if (vbox) {
set_bottom_editor(NULL);
memdelete(vbox); memdelete(vbox);
vbox = NULL;
} }
return; return;
} }
@ -631,7 +633,9 @@ void EditorPropertyDictionary::update_property() {
edit->set_text("Dictionary (Nil)"); //This provides symmetry with the array property. edit->set_text("Dictionary (Nil)"); //This provides symmetry with the array property.
edit->set_pressed(false); edit->set_pressed(false);
if (vbox) { if (vbox) {
set_bottom_editor(NULL);
memdelete(vbox); memdelete(vbox);
vbox = NULL;
} }
return; return;
} }