Skip to content

Commit

Permalink
Merge pull request #36059 from ishtatann/ishta-bugfix-36056
Browse files Browse the repository at this point in the history
Bug fix for #36056.  Verify the skill id is not null before calling npc practice.
  • Loading branch information
ZhilkinSerg authored Dec 13, 2019
2 parents 5024dab + f21e5a7 commit 6de51e1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/mission_companion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1700,7 +1700,10 @@ void talk_function::companion_skill_trainer( npc &comp, const std::string &skill
comp.practice( skill_id( skill_tested ), difficulty * to_minutes<int>( time_worked ) / 10 );
} else {
for( int i = 0; i < checks; i++ ) {
comp.practice( *skill_practice.pick(), difficulty );
skill_id *ident = skill_practice.pick();
if( ident ) {
comp.practice( *ident, difficulty );
}
}
}
}
Expand Down

0 comments on commit 6de51e1

Please sign in to comment.