summaryrefslogtreecommitdiff
path: root/src/components/policy/policy_regular/src/cache_manager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/policy/policy_regular/src/cache_manager.cc')
-rw-r--r--src/components/policy/policy_regular/src/cache_manager.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/components/policy/policy_regular/src/cache_manager.cc b/src/components/policy/policy_regular/src/cache_manager.cc
index 97e0aa3b4d..ed2bbefcd7 100644
--- a/src/components/policy/policy_regular/src/cache_manager.cc
+++ b/src/components/policy/policy_regular/src/cache_manager.cc
@@ -1105,11 +1105,12 @@ CacheManager::GetNotificationsNumber(const std::string& priority,
CACHE_MANAGER_CHECK(0);
sync_primitives::AutoLock auto_lock(cache_lock_);
- const auto& nnpm = is_subtle
- ? pt_->policy_table.module_config
- .subtle_notifications_per_minute_by_priority
- : pt_->policy_table.module_config
- .notifications_per_minute_by_priority;
+ const auto& module_config = pt_->policy_table.module_config;
+ const auto& nnpm =
+ is_subtle && module_config.subtle_notifications_per_minute_by_priority
+ .is_initialized()
+ ? *module_config.subtle_notifications_per_minute_by_priority
+ : module_config.notifications_per_minute_by_priority;
auto priority_iter = nnpm.find(priority);