X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdevices%2Fsessionfile.cpp;h=8a583eeba0ffb08b8015da6fd5f6890d77488c7f;hp=e6920ff5e299a6a5b5e437b2768d3d020549f2e0;hb=2ad82c2e40b6865481733913a2c32735602f63c4;hpb=a3f678a7cad210fe796f4a76370996a1284da6d4 diff --git a/pv/devices/sessionfile.cpp b/pv/devices/sessionfile.cpp index e6920ff5..8a583eeb 100644 --- a/pv/devices/sessionfile.cpp +++ b/pv/devices/sessionfile.cpp @@ -30,10 +30,12 @@ namespace devices { SessionFile::SessionFile(const std::shared_ptr context, const std::string &file_name) : File(file_name), - context_(context) { + context_(context) +{ } -void SessionFile::open() { +void SessionFile::open() +{ if (session_) close(); @@ -41,7 +43,8 @@ void SessionFile::open() { device_ = session_->devices()[0]; } -void SessionFile::close() { +void SessionFile::close() +{ if (session_) session_->remove_devices(); }