Skip to content

Commit

Permalink
Force inspector to clean up on delete, fixes crash.
Browse files Browse the repository at this point in the history
  • Loading branch information
reduz committed Mar 7, 2019
1 parent 6cb841e commit b376273
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions editor/editor_inspector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1236,6 +1236,7 @@ EditorInspectorSection::EditorInspectorSection() {
}

EditorInspectorSection::~EditorInspectorSection() {

if (!vbox_added) {
memdelete(vbox);
}
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit b376273

Please sign in to comment.