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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/activity_item_handling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1631,7 +1631,8 @@ static activity_reason_info can_do_activity_there( const activity_id &act, playe
// we need a shovel/hoe
return activity_reason_info::fail( do_activity_reason::NEEDS_TILLING );
}
} else if( here.has_flag_ter_or_furn( seed->seed->required_terrain_flag, src_loc ) &&
} else if( seed.is_valid() &&
here.has_flag_ter_or_furn( seed->seed->required_terrain_flag, src_loc ) &&
warm_enough_to_plant( src_loc ) ) {
if( here.has_items( src_loc ) ) {
return activity_reason_info::fail( do_activity_reason::BLOCKING_TILE );
Expand Down
Loading