mirror of
https://github.com/godotengine/godot
synced 2024-09-06 04:43:47 +00:00
Force inspector to clean up on delete, fixes crash.
This commit is contained in:
parent
6cb841edcb
commit
b376273f1b
|
@ -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