浏览代码

Fix crash when reverting an exported array / dict to NULL

Paulb23 6 年之前
父节点
当前提交
c3d712f414
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      editor/editor_properties_array_dict.cpp

+ 4 - 0
editor/editor_properties_array_dict.cpp

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