Skip to content

Commit

Permalink
Merge pull request #78960 from RenechCDDA/load_plant_data_safely
Browse files Browse the repository at this point in the history
Check validity of plant data on load
  • Loading branch information
Maleclypse authored Jan 5, 2025
2 parents f2be256 + ef3ed83 commit 7a6ab2d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/mapdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1321,6 +1321,13 @@ void furn_t::check() const
e.str().c_str() );
}
}
if( plant && !plant->transform.is_valid() ) {
debugmsg( "Invalid furniture %s for plant transform in furn %s", plant->transform.c_str(),
id.c_str() );
}
if( plant && !plant->base.is_valid() ) {
debugmsg( "Invalid furniture %s for plant base in furn %s", plant->base.c_str(), id.c_str() );
}
}

int activity_byproduct::roll() const
Expand Down

0 comments on commit 7a6ab2d

Please sign in to comment.