diff --git a/src/achievement.cpp b/src/achievement.cpp index bbec6598f4d0b..6229162f4ab3e 100644 --- a/src/achievement.cpp +++ b/src/achievement.cpp @@ -798,12 +798,12 @@ void achievements_tracker::report_achievement( const achievement *a, achievement tracker_it->second.current_values() } ); + trackers_.erase( tracker_it ); if( comp == achievement_completion::completed ) { achievement_attained_callback_( a, is_enabled() ); } else if( comp == achievement_completion::failed ) { achievement_failed_callback_( a, is_enabled() ); } - trackers_.erase( tracker_it ); } achievement_completion achievements_tracker::is_completed( const achievement_id &id ) const