Skip to content
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

Defer call to set_break_language #90776

Merged

Conversation

Naros
Copy link
Contributor

@Naros Naros commented Apr 17, 2024

Fixes #86816

As ScriptExtension objects are not yet set up when this is called to invoke virtuals, by using call_deferred, we avoid this error:

ERROR: Required virtual method ScriptExtension::_get_language must be overridden before calling.
   at: _gdvirtual__get_language_call (./core/object/script_language_extension.h:106)

Copy link
Member

@vnen vnen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if there's a better time to do this, maybe some other notification. But I cannot think of anything at the moment, so this is a good compromise.

@akien-mga akien-mga changed the title Defer call to set_break_language Defer call to set_break_language Apr 19, 2024
@akien-mga akien-mga merged commit e50867a into godotengine:master Apr 19, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Postinitialize hook on custom ScriptExtensions always produces an error in debug mode
4 participants