From: Soeren Apel Date: Sun, 3 May 2020 10:17:38 +0000 (+0200) Subject: Fix #1540 by adding a null pointer check X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=f95b1d810934308db9a0d71743f8462c16b79a0c;p=pulseview.git Fix #1540 by adding a null pointer check --- diff --git a/pv/views/decoder_binary/view.cpp b/pv/views/decoder_binary/view.cpp index 797321fc..94e9cc67 100644 --- a/pv/views/decoder_binary/view.cpp +++ b/pv/views/decoder_binary/view.cpp @@ -371,8 +371,9 @@ void View::on_selected_class_changed(int index) { bin_class_id_ = class_selector_->itemData(index).value(); - binary_data_exists_ = - signal_->get_binary_data_chunk_count(current_segment_, decoder_, bin_class_id_); + binary_data_exists_ = (signal_) ? + signal_->get_binary_data_chunk_count(current_segment_, decoder_, bin_class_id_) : + false; update_data(); }