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

Prevent NPE from querying toolbelt before capability initialization #2721

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

M-W-K
Copy link
Contributor

@M-W-K M-W-K commented Feb 12, 2025

What

Fixes NPEs from querying a toolbelt stack before its handler capability has been initialized.

Implementation Details

Added a static fallback instance in case a handler cannot be found on a toolbelt stack.

Outcome

Mods that query a toolbelt who's capabilities are being initialized for information won't throw an NPE

@M-W-K M-W-K added type: refactor Suggestion to refactor a section of code ignore changelog PR should not be added to the changelog. labels Feb 12, 2025
@M-W-K M-W-K requested a review from a team as a code owner February 12, 2025 02:37
@htmlcsjs htmlcsjs enabled auto-merge (squash) February 13, 2025 18:43
@kumquat-ir kumquat-ir added type: refactor Suggestion to refactor a section of code ignore changelog PR should not be added to the changelog. and removed type: refactor Suggestion to refactor a section of code ignore changelog PR should not be added to the changelog. labels Feb 13, 2025
@htmlcsjs htmlcsjs merged commit a061c0d into master Feb 13, 2025
4 of 5 checks passed
@htmlcsjs htmlcsjs deleted the toolbelt-race branch February 13, 2025 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ignore changelog PR should not be added to the changelog. type: refactor Suggestion to refactor a section of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants