mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-24 17:15:07 +03:00
libcamera: pipeline: simple: Only connect created converters
If converter_->open() fails, the code deletes the converter_ but then happily goes on, and at the very next lines will use converter_ to connect the bufferReady signal. Ensure the converter is only connected when successfully opened by extending the conditional and connecting in an else scope instead. Reported-by: Tomi Valkeinen <tomi.valkeinen@iki.fi> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
7973efcbc0
commit
7adf3a0698
1 changed files with 2 additions and 2 deletions
|
@ -774,9 +774,9 @@ bool SimplePipelineHandler::match(DeviceEnumerator *enumerator)
|
|||
<< "Failed to open converter, disabling format conversion";
|
||||
delete converter_;
|
||||
converter_ = nullptr;
|
||||
} else {
|
||||
converter_->bufferReady.connect(this, &SimplePipelineHandler::converterDone);
|
||||
}
|
||||
|
||||
converter_->bufferReady.connect(this, &SimplePipelineHandler::converterDone);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue