-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix crash by ensuring selected node is a descendant of the edited scene #95420
Merged
akien-mga
merged 1 commit into
godotengine:master
from
TokisanGames:fix-crash-selecting-notdescendant
Aug 16, 2024
Merged
Fix crash by ensuring selected node is a descendant of the edited scene #95420
akien-mga
merged 1 commit into
godotengine:master
from
TokisanGames:fix-crash-selecting-notdescendant
Aug 16, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Chaosus
added
the
cherrypick:4.3
Considered for cherry-picking into a future 4.3.x release
label
Aug 12, 2024
KoBeWi
reviewed
Aug 12, 2024
KoBeWi
approved these changes
Aug 12, 2024
TokisanGames
force-pushed
the
fix-crash-selecting-notdescendant
branch
from
August 13, 2024 05:03
94f5a2c
to
56d902e
Compare
TokisanGames
force-pushed
the
fix-crash-selecting-notdescendant
branch
from
August 13, 2024 05:09
56d902e
to
b1a45d9
Compare
Committed and squashed the suggested changes. Ready to go. |
Thanks! |
Cherry-picked for 4.3.1. |
akien-mga
removed
the
cherrypick:4.3
Considered for cherry-picking into a future 4.3.x release
label
Sep 16, 2024
This was referenced Sep 17, 2024
Ryan-000
pushed a commit
to Ryan-000/godot
that referenced
this pull request
Nov 11, 2024
…cting-notdescendant Fix crash by ensuring selected node is a descendant of the edited scene
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #95356,
Caused by regression #92188
Bugsquad edit: Fixes #94844
Previously this section of code allowed selecting nodes not descended from the edited scene, ascending beyond Godot's Window, resulting in a crash calling a function on a null.
This PR fixes that by requiring the selected node be a descendent of the edited scene (also a prereq of
ownership
), and fixes or reduces other aspects.is_ancestor_of
fixes both the error message (affecting 4.2.2-stable) and crash (affecting 4.3) identified in Crash In Node3DEditorPlugin Selecting On Viewport #95356node != edited_scene && !get_owner
is consistent with 2Dgodot/editor/plugins/canvas_item_editor_plugin.cpp
Line 706 in 8e2141e