[libcamera-devel] [PATCH] lc-compliance: Initialize the event loop pointer

Laurent Pinchart laurent.pinchart at ideasonboard.com
Tue Apr 13 23:55:16 CEST 2021


Hi Niklas,

Thank you for the patch.

On Tue, Apr 13, 2021 at 11:52:56PM +0200, Niklas Söderlund wrote:
> The event loop pointer loop_ was not initialized. This have no effect on

s/have/has/

> the current code flow but could in the future lead to hard debug
> problems.
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>

Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

> ---
>  src/lc-compliance/simple_capture.cpp | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/lc-compliance/simple_capture.cpp b/src/lc-compliance/simple_capture.cpp
> index 0ff720bfd0052e45..8f714d3b5e73e28e 100644
> --- a/src/lc-compliance/simple_capture.cpp
> +++ b/src/lc-compliance/simple_capture.cpp
> @@ -10,7 +10,8 @@
>  using namespace libcamera;
>  
>  SimpleCapture::SimpleCapture(std::shared_ptr<Camera> camera)
> -	: camera_(camera), allocator_(std::make_unique<FrameBufferAllocator>(camera))
> +	: loop_(nullptr), camera_(camera),
> +	  allocator_(std::make_unique<FrameBufferAllocator>(camera))
>  {
>  }
>  

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list