Skip to content

Fixed dueling NPE#650

Open
ipkpjersi wants to merge 2 commits into2006-Scape:masterfrom
ipkpjersi:fix-dueling-npe
Open

Fixed dueling NPE#650
ipkpjersi wants to merge 2 commits into2006-Scape:masterfrom
ipkpjersi:fix-dueling-npe

Conversation

@ipkpjersi
Copy link
Contributor

@ipkpjersi ipkpjersi commented Dec 31, 2023

Why was this null? Right clicking player and sending duel request via "Challenge" option produces an NPE, because packet is null, but ChallengePlayer checks packet.getOpcode() value without checking if packet is null first. Dueling, sending a challenge, etc all that still works fine even with an NPE but why have an NPE in the first place?

This closes #639 but is it correct?

Why was this null? Right clicking player and sending duel request via "Challenge" option produces an NPE, because packet is null, but ChallengePlayer checks packet.getOpcode without checking if packet is not null
We don't know if we will receive good data so might as well check it.
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.

Dueling NPE

1 participant