mobile/statistics: fix crash in dropdowns

The code was protecting against the wrong member being NULL.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Berthold Stoeger 2021-01-11 08:46:46 -08:00 committed by Dirk Hohndel
parent 1a0f6f53ed
commit 6c315eaf21

View file

@ -99,7 +99,7 @@ void StatsManager::var2BinnerChanged(int idx)
void StatsManager::var2OperationChanged(int idx)
{
if (uiState.var2.variables.empty())
if (uiState.operations2.variables.empty())
return;
idx = std::clamp(idx, 0, (int)uiState.operations2.variables.size());
state.var2OperationChanged(uiState.operations2.variables[idx].id);