-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Prevent crash when accessing Node
Multiplayer from thread
#79332
Conversation
I'm not super up to date regarding threading macros, but I think we could use:
and
|
My reasoning here was to leave the error messages to the |
Ah, that makes sense! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 🏆
I think the reasoning about the checks makes sense. |
Thanks! |
Thank you! |
Cherry-picked for 4.1.2. |
Prevents crashes when accessing a null-pointer on thread check failing in
SceneTree
, still won't prevent the same on access tomultiplayer
from script, where you still need to check for nullDidn't use
ERR_FAIL_NULL
because we already get an error fromSceneTree
so felt excessive to add another error messageCould alternatively add a check here for threading, but thought best to leave it in
SceneTree
to prevent confusion/divergenceHaven't tested since I don't have mono set up but might prevent a crash in #77707