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 for liquid handling during butchery after interruption #36245

Merged
merged 3 commits into from Dec 19, 2019
Merged

Fix for liquid handling during butchery after interruption #36245

merged 3 commits into from Dec 19, 2019

Conversation

ghost
Copy link

@ghost ghost commented Dec 19, 2019

Summary

SUMMARY: Bugfixes "Fix for liquid handling during butchery after interruption"

Purpose of change

Fixes #35514

Describe the solution

The activity was cancelled halfway through the butcher_finish function, due to the liquid handling calling cancel_activity when interrupted, this clears the activity targets etc.
Then the rest of the function finishes, and tries to pop_back() on empty activity targets and remove the item that was a reference to activity target.

Ive made the target a non-reference, and checked for targets being non-empty before pop_back() as these things are changed during the function.

Describe alternatives you've considered

N/A

Testing

modified the code to spawn a zombie during liquid handling in butcher_finish() , this forced an interruption every time, caused a crash every time.
Now no crash.

Additional context

N/A

@I-am-Erk I-am-Erk added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` labels Dec 19, 2019
@ZhilkinSerg ZhilkinSerg merged commit 8208210 into CleverRaven:master Dec 19, 2019
@ghost ghost deleted the butchery-crash branch December 19, 2019 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash while butchering - magiclysm
2 participants