diff options
author | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2021-06-21 17:49:34 -0700 |
---|---|---|
committer | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2021-09-06 17:14:12 -0700 |
commit | 226d6337e5b6f119c4519da15877708cb026a02d (patch) | |
tree | 8f02a90c25f50036d648949c142b50126cf7dc20 /scene/main/scene_tree.cpp | |
parent | 29bdd000f0e59b8076929f7f05f06059d3d16fef (diff) |
Fix process mode update when mode owner is set to Inherit
Prevent the root node to be set to PROCESS_MODE_INHERIT, since it causes
undefined behavior.
Fix a case where the process owner node is wrongly set to the direct
parent instead of the proper node.
Add errors for all unhandled cases.
Diffstat (limited to 'scene/main/scene_tree.cpp')
-rw-r--r-- | scene/main/scene_tree.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index 8260d0dff5..f0e39c0768 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -1331,6 +1331,7 @@ SceneTree::SceneTree() { // Create with mainloop. root = memnew(Window); + root->set_process_mode(Node::PROCESS_MODE_PAUSABLE); root->set_name("root"); #ifndef _3D_DISABLED if (!root->get_world_3d().is_valid()) { |