mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
1a0f6f53ed
commit
6c315eaf21
1 changed files with 1 additions and 1 deletions
|
@ -99,7 +99,7 @@ void StatsManager::var2BinnerChanged(int idx)
|
||||||
|
|
||||||
void StatsManager::var2OperationChanged(int idx)
|
void StatsManager::var2OperationChanged(int idx)
|
||||||
{
|
{
|
||||||
if (uiState.var2.variables.empty())
|
if (uiState.operations2.variables.empty())
|
||||||
return;
|
return;
|
||||||
idx = std::clamp(idx, 0, (int)uiState.operations2.variables.size());
|
idx = std::clamp(idx, 0, (int)uiState.operations2.variables.size());
|
||||||
state.var2OperationChanged(uiState.operations2.variables[idx].id);
|
state.var2OperationChanged(uiState.operations2.variables[idx].id);
|
||||||
|
|
Loading…
Add table
Reference in a new issue