diff --git a/client/lobby/OptionsTab.cpp b/client/lobby/OptionsTab.cpp index e7698ba48..246104a76 100644 --- a/client/lobby/OptionsTab.cpp +++ b/client/lobby/OptionsTab.cpp @@ -503,7 +503,7 @@ void OptionsTab::SelectionWindow::recreate() int count = 0; for(auto & elem : allowedHeroes) { - CHero * type = VLC->heroh->objects[elem]; + const CHero * type = elem.toHeroType(); if(type->heroClass->faction == selectedFaction) { count++;