]> git.sesse.net Git - nageru/commitdiff
Fix a segfault on bmusb hotplug in simple audio mode.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 31 Oct 2016 18:08:21 +0000 (19:08 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 31 Oct 2016 18:08:21 +0000 (19:08 +0100)
mainwindow.cpp

index 36ea55ee3f8883fbe4e97fa484570bc26e70e8ee..4127f917cf35d77013d8bf76ec08a0c289300b1d 100644 (file)
@@ -1290,6 +1290,9 @@ void MainWindow::set_white_balance(int channel_number, int x, int y)
 void MainWindow::audio_state_changed()
 {
        post_to_main_thread([this]{
+               if (global_audio_mixer->get_mapping_mode() == AudioMixer::MappingMode::SIMPLE) {
+                       return;
+               }
                InputMapping mapping = global_audio_mixer->get_input_mapping();
                for (unsigned bus_index = 0; bus_index < mapping.buses.size(); ++bus_index) {
                        const InputMapping::Bus &bus = mapping.buses[bus_index];