fix crash in mp lobby
Fixes #4792 Previously that line would call generator::set_item_shown which inherits that class since set_item_shown is virtual. This doesn't work, in particular since generator::set_item_shown wouldn't do anything if the to-be-deleted selected item is already hidden. (which for some reason happens quite often in the mp lobby window). This resulted in generator::delete_item deleting a selecting item, so selected_item_count_ would become wrong.
This commit is contained in:
parent
4b5c7c291b
commit
2618583a28
1 changed files with 1 additions and 1 deletions
|
@ -83,7 +83,7 @@ bool one_item::deselect_item(const unsigned index)
|
|||
void one_item::delete_item(const unsigned index)
|
||||
{
|
||||
// this needs the same logic for ensuring that at least one item is selected
|
||||
set_item_shown(index, false);
|
||||
one_item::set_item_shown(index, false);
|
||||
}
|
||||
|
||||
void no_item::set_item_shown(const unsigned index, const bool show)
|
||||
|
|
Loading…
Add table
Reference in a new issue