Skip to content

Commit

Permalink
Fix autodoc crash when uninstalling included CBMs (CleverRaven#53252)
Browse files Browse the repository at this point in the history
  • Loading branch information
GoLoT authored Dec 7, 2021
1 parent 4fc3d5b commit 126366c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/iexamine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4983,8 +4983,10 @@ void iexamine::autodoc( Character &you, const tripoint &examp )
std::vector<bionic_id> bio_list;
std::vector<std::string> bionic_names;
for( const bionic &bio : installed_bionics ) {
bio_list.emplace_back( bio.id );
bionic_names.emplace_back( bio.info().name.translated() );
if( item::type_is_defined( bio.info().itype() ) ) {
bio_list.emplace_back( bio.id );
bionic_names.emplace_back( bio.info().name.translated() );
}
}
int bionic_index = uilist( _( "Choose bionic to uninstall" ), bionic_names );
if( bionic_index < 0 ) {
Expand Down

0 comments on commit 126366c

Please sign in to comment.