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: check for valid seed before reference in can_do_activity_there() #4262

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

ekaratzas
Copy link
Contributor

@ekaratzas ekaratzas commented Feb 28, 2024

Purpose of change

Fix segfault introduced in ba60edc when attempting to make a farmplot zone of "No Seed" and then trying to farm said plot using automatic actions via "O"->"m".

Describe the solution

Check for valid seed object before referencing it.

Describe alternatives you've considered

Testing

Repro'd the crash based on instructions in bug ticket #4243 on top of 0b5331a by following ticket repro steps. Tested fix by following same steps and seeing that character can now plow the farm field just fine.

Additional context

Checklist

@github-actions github-actions bot added the src changes related to source code. label Feb 28, 2024
@chaosvolt
Copy link
Member

Can add the phrase Fixes https://github.com/cataclysmbnteam/Cataclysm-BN/issues/4243 to the PR OP and that'll automatically close the relevant issue when this gets merged.

@scarf005 scarf005 changed the title fix: check for valid seed before reference in can_do_activity_there() (#4243) fix: check for valid seed before reference in can_do_activity_there() Feb 28, 2024
Copy link
Member

@scarf005 scarf005 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets see if it works.

@scarf005 scarf005 merged commit 05cb72e into cataclysmbnteam:main Feb 28, 2024
13 checks passed
@ekaratzas
Copy link
Contributor Author

Can add the phrase Fixes https://github.com/cataclysmbnteam/Cataclysm-BN/issues/4243 to the PR OP and that'll automatically close the relevant issue when this gets merged.

Good point, I'll keep it in mind for the future. Thanks!

@ekaratzas ekaratzas deleted the fix-invalid-seed-4243 branch March 10, 2024 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
src changes related to source code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Farming crash
3 participants