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

Fixed dueling NPE #650

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

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