]> sigrok.org Git - pulseview.git/commitdiff
Fix #1540 by adding a null pointer check
authorSoeren Apel <redacted>
Sun, 3 May 2020 10:17:38 +0000 (12:17 +0200)
committerUwe Hermann <redacted>
Sun, 3 May 2020 15:20:55 +0000 (17:20 +0200)
pv/views/decoder_binary/view.cpp

index 797321fc2a67f7665275bf3316fb1a44097dde93..94e9cc673004e75e52195e79a3f980a7af6f37dd 100644 (file)
@@ -371,8 +371,9 @@ void View::on_selected_class_changed(int index)
 {
        bin_class_id_ = class_selector_->itemData(index).value<uint32_t>();
 
-       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();
 }