Skip to content

Commit

Permalink
fix for potential nullptr
Browse files Browse the repository at this point in the history
  • Loading branch information
cake-pie committed Feb 8, 2023
1 parent 400f592 commit 6570f88
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/avatar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,9 @@ void avatar::control_npc( npc &np )
g->update_map( *this, z_level_changed );
character_mood_face( true );

profession_id prof_id = prof ? prof->ident() : profession::generic()->ident();
get_event_bus().send<event_type::game_avatar_new>( false, getID(), name, male,
prof->ident(), custom_profession );
prof_id, custom_profession );
}

void avatar::control_npc_menu()
Expand Down

0 comments on commit 6570f88

Please sign in to comment.