libcamera: pipeline_handler: Disconnect MediaDevice::disconnected signal
The pipeline handler connects the disconnected signal of MediaDevice instances registered for hotplug handling to a member slot. Disconnect the signal when the slot is called, as the pipeline handler will be deleted. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
@@ -241,6 +241,8 @@ void PipelineHandler::hotplugMediaDevice(MediaDevice *media)
|
||||
*/
|
||||
void PipelineHandler::mediaDeviceDisconnected(MediaDevice *media)
|
||||
{
|
||||
media->disconnected.disconnect(this);
|
||||
|
||||
if (cameras_.empty())
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user