X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fmainwindow.cpp;h=0089b112a721f1585a9813134328cfd30c360ccb;hp=7a7a1b12baddf2ee85acdf65ee2cd64b3db09e86;hb=e95e8563a1de0d2045cb8f30083889896b6c94df;hpb=65a53225414471cb2701db2429aa3ab9e74e5b21 diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp index 7a7a1b12..0089b112 100644 --- a/pv/mainwindow.cpp +++ b/pv/mainwindow.cpp @@ -299,11 +299,9 @@ void MainWindow::update_device_list() if (std::find(devices.begin(), devices.end(), selected_device) == devices.end()) devices.push_back(selected_device); + assert(selected_device); - _sampling_bar->set_device_list(devices); - - if (selected_device) - _sampling_bar->set_selected_device(selected_device); + _sampling_bar->set_device_list(devices, selected_device); } void MainWindow::load_file(QString file_name)