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: remove prey slot crash #1489

Merged
merged 1 commit into from
Aug 23, 2023
Merged

fix: remove prey slot crash #1489

merged 1 commit into from
Aug 23, 2023

Conversation

dudantas
Copy link
Member

@dudantas dudantas commented Aug 23, 2023

This issue occurs under a very specific scenario: if the server removes a monster, and it is saved, except in the player's database. In this case, the monster type will cease to exist, and there may be an attempt to access memory that has already been freed, leading to a crash.

Even though this situation should not occur in a production environment (unless it's due to an error on the part of the server owner), I have decided to take preventive measures to avoid further complications.

Now, instead of causing a crash, the system will simply log a message informing that the monster must be removed from the player's prey list. This change enhances stability and provides clear information for troubleshooting if the issue ever arises.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@dudantas dudantas merged commit 10a7142 into main Aug 23, 2023
@dudantas dudantas deleted the fix-remove-prey-slot branch August 23, 2023 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants