From 6c315eaf218885db43522bb1122cbb882f57196a Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Mon, 11 Jan 2021 08:46:46 -0800 Subject: mobile/statistics: fix crash in dropdowns The code was protecting against the wrong member being NULL. Signed-off-by: Berthold Stoeger Signed-off-by: Dirk Hohndel --- mobile-widgets/statsmanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.3-70-g09d2