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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix crash when SaveRespawnTimeImmediately config option is set to 0 #542
Conversation
if (remove) | ||
{ | ||
// if option set then object already saved at this moment | ||
if (!sWorld.getConfig(CONFIG_BOOL_SAVE_RESPAWN_TIME_IMMEDIATELY)) | ||
obj->SaveRespawnTime(); | ||
|
||
obj->ResetMap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is unnecessary because obj
is getting deleted right afterwards anyway, but maybe there was method to the madness, hence I kept it in both branches.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I vote for removing this, since the destructor called by delete
can invoke m_currMap->RemoveFromOnEventNotified(this);
Can you please post the stack trace? |
|
馃嵃 Pullrequest
This PR fixes a crash that occurs when
SaveRespawnTimeImmediately
is set to 0How2Test
SaveRespawnTimeImmediately
to 0 inmangosd.conf