diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-01-11 08:46:46 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-01-12 08:31:35 -0800 |
commit | 6c315eaf218885db43522bb1122cbb882f57196a (patch) | |
tree | 8dbb4918c8a4ee0a9036cd01d268830f17314aa7 | |
parent | 1a0f6f53ede1a945c9964fc9de73780a94cd8217 (diff) | |
download | subsurface-6c315eaf218885db43522bb1122cbb882f57196a.tar.gz |
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>
-rw-r--r-- | mobile-widgets/statsmanager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mobile-widgets/statsmanager.cpp b/mobile-widgets/statsmanager.cpp index 639b9294a..1280f0990 100644 --- a/mobile-widgets/statsmanager.cpp +++ b/mobile-widgets/statsmanager.cpp @@ -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); |