diff options
Diffstat (limited to 'src/components/policy/policy_external/src/cache_manager.cc')
-rw-r--r-- | src/components/policy/policy_external/src/cache_manager.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/components/policy/policy_external/src/cache_manager.cc b/src/components/policy/policy_external/src/cache_manager.cc index fee1bce426..039ab5d3d0 100644 --- a/src/components/policy/policy_external/src/cache_manager.cc +++ b/src/components/policy/policy_external/src/cache_manager.cc @@ -1802,11 +1802,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); |