projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add missing default to switch/case block.
[pulseview.git]
/
pv
/
sigsession.cpp
diff --git
a/pv/sigsession.cpp
b/pv/sigsession.cpp
index d89ca61c0d0d44863e180df07da6ac0802713f1c..dfd0cedb6dc96877871bbbd4774dc1af77c2da2c 100644
(file)
--- a/
pv/sigsession.cpp
+++ b/
pv/sigsession.cpp
@@
-83,7
+83,8
@@
SigSession::~SigSession()
// Stop and join to the thread
stop_capture();
// Stop and join to the thread
stop_capture();
- _dev_inst->release();
+ if (_dev_inst)
+ _dev_inst->release();
// TODO: This should not be necessary
_session = NULL;
// TODO: This should not be necessary
_session = NULL;
@@
-99,6
+100,9
@@
void SigSession::set_device(
{
using pv::device::Device;
{
using pv::device::Device;
+ if (!dev_inst)
+ return;
+
// Ensure we are not capturing before setting the device
stop_capture();
// Ensure we are not capturing before setting the device
stop_capture();
@@
-630,6
+634,8
@@
void SigSession::data_feed_in(const struct sr_dev_inst *sdi,
frame_ended();
break;
}
frame_ended();
break;
}
+ default:
+ break;
}
}
}
}