summaryrefslogtreecommitdiffstats
path: root/editor/editor_inspector.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-04-30 17:03:25 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-04-30 17:03:25 +0200
commitbf00e1efde974d53691e9ae467ec614135dfb051 (patch)
tree1c8cad3b4a1af35e1bdb6807ab31d80fa8544034 /editor/editor_inspector.cpp
parentb1da4b2a840668f0ae8ab0271905d63ef3a942f2 (diff)
parenteefd3114560afcfbaf826c806deabefb3643750c (diff)
downloadredot-engine-bf00e1efde974d53691e9ae467ec614135dfb051.tar.gz
Merge pull request #91168 from kitbdev/docks-dont-edit-current-v2
Don't edit current when changing docks v2
Diffstat (limited to 'editor/editor_inspector.cpp')
-rw-r--r--editor/editor_inspector.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index 41396a2ed1..f1e487d79b 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -4024,14 +4024,16 @@ void EditorInspector::_notification(int p_what) {
} break;
case NOTIFICATION_PREDELETE: {
- edit(nullptr); //just in case
+ if (EditorNode::get_singleton() && !EditorNode::get_singleton()->is_exiting()) {
+ // Don't need to clean up if exiting, and object may already be freed.
+ edit(nullptr);
+ }
} break;
case NOTIFICATION_EXIT_TREE: {
if (!sub_inspector) {
get_tree()->disconnect("node_removed", callable_mp(this, &EditorInspector::_node_removed));
}
- edit(nullptr);
} break;
case NOTIFICATION_VISIBILITY_CHANGED: {