Fix NPE in VMatchUI.populate when cellWithHands is null#9875
Merged
tool4ever merged 1 commit intoCard-Forge:masterfrom Feb 22, 2026
Merged
Fix NPE in VMatchUI.populate when cellWithHands is null#9875tool4ever merged 1 commit intoCard-Forge:masterfrom
tool4ever merged 1 commit intoCard-Forge:masterfrom
Conversation
The isShowing() checks added in 56ba728 can cause cellWithHands to be null during initial game load (before Swing has realized components) or when the user's saved layout is missing expected panels. Add a fallback chain that remembers any existing hand cell even if not yet showing, and guard against null at the addDoc call site. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
tool4ever
approved these changes
Feb 22, 2026
clairchiara
pushed a commit
to clairchiara/forge
that referenced
this pull request
Feb 28, 2026
) The isShowing() checks added in 56ba728 can cause cellWithHands to be null during initial game load (before Swing has realized components) or when the user's saved layout is missing expected panels. Add a fallback chain that remembers any existing hand cell even if not yet showing, and guard against null at the addDoc call site. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the crash on game start reported by smokeweedle on Discord, caused by a null
cellWithHandsinVMatchUI.populate().#9637 added
isShowing()checks to the hand discovery loop so that after a layout refresh, hands wouldn't get placed into stale cells that existed in memory but were no longer part of the visible layout. However, these same checks can also reject perfectly valid cells during initial game load — before Swing has fully realized the components, or when the user's saved layout is missing expected panels like REPORT_LOG. When every cell fails theisShowing()check and all fallbacks return null, the game crashes with:The fix adds a last-resort fallback that remembers any existing hand cell even if not yet showing. If every fallback still somehow returns null, the hand placement is skipped rather than crashing — the hand panel will appear on the next layout refresh or repopulate call.
🤖 Generated with Claude Code