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

Fix: Deleting a player while it's in a guild cause the server to crash. (Issue #971). #972

Merged
merged 1 commit into from
Dec 3, 2022

Conversation

drk84
Copy link
Member

@drk84 drk84 commented Dec 3, 2022

When a player is deleted the ClearPlayer method is called and this set the m_pPlayer property to null. When a deleted player is inside a guild, the Guild_Resign method will fail because this method relies upon the m_pPlayer to succeed (and the destructor is called after ClearPlayer).

So i just moved the Guild_Resign method in the ClearPlayer before the m_pPlayer property is set to null.

…h. (Issue Sphereserver#971).

When a player is deleted the ClearPlayer method is called and this set the m_pPlayer property to null. When a deleted player is inside a guild, the Guild_Resign method will fail because this method relies upon the m_pPlayer to succeed (and the destructor is called after ClearPlayer).

So i just moved the Guild_Resign method in the ClearPlayer before the m_pPlayer property is set to null.
@drk84 drk84 merged commit 888fe9a into Sphereserver:master Dec 3, 2022
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.

None yet

1 participant