Force inspector to clean up on delete, fixes crash.
This commit is contained in:
parent
6cb841edcb
commit
b376273f1b
1 changed files with 4 additions and 0 deletions
|
@ -1236,6 +1236,7 @@ EditorInspectorSection::EditorInspectorSection() {
|
|||
}
|
||||
|
||||
EditorInspectorSection::~EditorInspectorSection() {
|
||||
|
||||
if (!vbox_added) {
|
||||
memdelete(vbox);
|
||||
}
|
||||
|
@ -2140,6 +2141,9 @@ void EditorInspector::_notification(int p_what) {
|
|||
get_tree()->connect("node_removed", this, "_node_removed");
|
||||
}
|
||||
}
|
||||
if (p_what == NOTIFICATION_PREDELETE) {
|
||||
edit(NULL); //just in case
|
||||
}
|
||||
if (p_what == NOTIFICATION_EXIT_TREE) {
|
||||
|
||||
if (!sub_inspector) {
|
||||
|
|
Loading…
Reference in a new issue