We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 906af00 commit 240f3deCopy full SHA for 240f3de
1 file changed
src/hws/cpu/hardware_sampler.cpp
@@ -618,7 +618,7 @@ void cpu_hardware_sampler::sampling_loop() {
618
} else {
619
if (this->sample_category_enabled(sample_category::idle_state)) {
620
const std::string header_str{ header[i] };
621
- if (idle_state_samples_.idle_states_.value().count(header_str) > decltype(idle_state_samples_)::map_type::size_type{ 0 }) {
+ if (idle_state_samples_.idle_states_.has_value() && idle_state_samples_.idle_states_.value().count(header_str) > decltype(idle_state_samples_)::map_type::size_type{ 0 }) {
622
using vector_type = cpu_idle_states_samples::map_type::mapped_type;
623
idle_state_samples_.idle_states_.value()[header_str].push_back(detail::convert_to<typename vector_type::value_type>(values[i]));
624
}
0 commit comments