Fix wrong class used in cast for selected AI/GS script info
This commit is contained in:
@@ -140,11 +140,11 @@ struct AIListWindow : public Window {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case WID_AIL_INFO_BG: {
|
case WID_AIL_INFO_BG: {
|
||||||
AIInfo *selected_info = nullptr;
|
ScriptInfo *selected_info = nullptr;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (const auto &item : *this->info_list) {
|
for (const auto &item : *this->info_list) {
|
||||||
i++;
|
i++;
|
||||||
if (this->selected == i - 1) selected_info = static_cast<AIInfo *>(item.second);
|
if (this->selected == i - 1) selected_info = static_cast<ScriptInfo *>(item.second);
|
||||||
}
|
}
|
||||||
/* Some info about the currently selected AI. */
|
/* Some info about the currently selected AI. */
|
||||||
if (selected_info != nullptr) {
|
if (selected_info != nullptr) {
|
||||||
|
Reference in New Issue
Block a user