// 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;
{
using pv::device::Device;
+ if (!dev_inst)
+ return;
+
// Ensure we are not capturing before setting the device
stop_capture();
frame_ended();
break;
}
+ default:
+ break;
}
}