]> sigrok.org Git - pulseview.git/commitdiff
Fix crash when saving session with open files
authorSoeren Apel <redacted>
Mon, 29 Aug 2016 16:10:09 +0000 (18:10 +0200)
committerSoeren Apel <redacted>
Mon, 29 Aug 2016 16:10:09 +0000 (18:10 +0200)
pv/mainwindow.cpp

index 45d805a8d6f87f2c08eb649cbdf930c70dca48df..77dc946213ef20850247fc0b5acf15f51b820df3 100644 (file)
@@ -273,7 +273,8 @@ void MainWindow::save_ui_settings()
                                dynamic_pointer_cast< devices::HardwareDevice >
                                (session->device());
 
-                       if (device->hardware_device()->driver()->name() == "demo")
+                       if (device &&
+                               device->hardware_device()->driver()->name() == "demo")
                                continue;
                }