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

MixinPressableWidget leaks this #69

Open
Gaming32 opened this issue May 21, 2024 · 0 comments
Open

MixinPressableWidget leaks this #69

Gaming32 opened this issue May 21, 2024 · 0 comments

Comments

@Gaming32
Copy link

IconicButtons.init calls ClickableWidget.getMessage on the partially initialized ClickableWidget passed in from MixinPressableWidget. This causes crashes in some mods, which haven't fully initialized their widgets yet. An example is World Host, where I haven't loaded the messages for the button yet, causing getMessage to NPE.

A potential solution would be to simply remove the IconicButtons.init call in MixinPressableWidget, and let renderIcons take care of it (which it will without any other changes, since it calls init if the text has changed, which it will have changed from null by the time it's called).

Fixing this will fix Gaming32/world-host#76.

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

No branches or pull requests

1 participant