-
-
Notifications
You must be signed in to change notification settings - Fork 582
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
Don't cache null
forever if a singleton isn't available yet
#1181
Conversation
Thanks! Since GDExtensions can try to access singletons before they are available, and we don't want to permanently punish a GDExtension for trying, this makes sense to me. However, it would also be great to make the core singletons available a little bit earlier - see PR godotengine/godot#79584 FYI, this will conflict with PR #1176 so one or the other will end up needing to be rebased, depending on which is merged first |
This needs a rebase now that #1176 is merged |
1ffa645
to
47d5eef
Compare
Rebased |
# Conflicts: # binding_generator.py
47d5eef
to
548c758
Compare
Updated |
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.
Thanks, this looks great to me!
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.
Discussed at the GDExtension meeting, and we think this makes sense!
This fixes the third point of issue #1180 (and perhaps the second one if that was the cause all along, but havent checked that yet)
If you call
get_singleton
too early and it returnsnullptr
, it would keep returningnullptr
forever.