From: Soeren Apel Date: Mon, 29 Aug 2016 16:10:09 +0000 (+0200) Subject: Fix crash when saving session with open files X-Git-Tag: pulseview-0.4.0~257 X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff_plain;h=f2040dcb783986fd478e910a13b6c9bcf8a0a4be;ds=sidebyside Fix crash when saving session with open files --- diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp index 45d805a8..77dc9462 100644 --- a/pv/mainwindow.cpp +++ b/pv/mainwindow.cpp @@ -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; }