Skip to content

fix(chat): guard against null Component in ChatText and PlayerNameResolver - #32

Merged
burgerfan41 merged 1 commit into
EdenGuild:masterfrom
Good627:fix/chat-text-null-component
Oct 14, 2026
Merged

burgerfan41 merged 1 commit into
EdenGuild:masterfrom
Good627:fix/chat-text-null-component

Conversation

@Good627

@Good627 Good627 commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Problem

In commit 9278bd4, \RaidPartyTracker.checkOrRequestParty()\ was introduced to synchronize Wynntils party members by calling \PlayerNameResolver.resolve(null, m)\ with a null \Component message. This called \ChatText.resolveRealName()\ and \ChatText.flatten(message), which called \message.visit()\ without a null check, throwing an unhandled \NullPointerException\ on the render thread during \EdenModClient.onClientTick()\ and crashing the client.

Solution

  • Add null-guards in \ChatText.flatten(), \ChatText.resolveRealName(), and \ChatText.resolveRealNameAnywhere()\ to return gracefully when \message == null.
  • Guard \PlayerNameResolver.resolve()\ to safely fall back to \canonicalize(displayed)\ when no message component is present.
  • Add unit tests in \ChatTextTest\ and \PlayerNameResolverTest\ covering null message handling.

@burgerfan41
burgerfan41 merged commit 0593a16 into EdenGuild:master Oct 14, 2026
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants