[libcamera-devel] cam: Initialize CamApp::loopUsers_
diff mbox series

Message ID 20210723040421.1898-1-laurent.pinchart@ideasonboard.com
State Accepted
Headers show
Series
  • [libcamera-devel] cam: Initialize CamApp::loopUsers_
Related show

Commit Message

Laurent Pinchart July 23, 2021, 4:04 a.m. UTC
The CamApp loopUsers_ member variable isn't initialized, which results
in random execution of the event loop. Fix it.

Fixes: caa6ffacb2fc ("cam: Reorganize run() function and merge the two event loops")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/cam/main.cpp | 1 +
 1 file changed, 1 insertion(+)

Comments

Umang Jain July 23, 2021, 2:16 p.m. UTC | #1
Hi Laurent,

Thanks for the patch.

On 7/23/21 9:34 AM, Laurent Pinchart wrote:
> The CamApp loopUsers_ member variable isn't initialized, which results
> in random execution of the event loop. Fix it.
>
> Fixes: caa6ffacb2fc ("cam: Reorganize run() function and merge the two event loops")
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Tested-by: Umang Jain <umang.jain@ideasonboard.com>
> ---
>   src/cam/main.cpp | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/src/cam/main.cpp b/src/cam/main.cpp
> index f9a90672a474..34cbc3229563 100644
> --- a/src/cam/main.cpp
> +++ b/src/cam/main.cpp
> @@ -56,6 +56,7 @@ private:
>   CamApp *CamApp::app_ = nullptr;
>   
>   CamApp::CamApp()
> +	: loopUsers_(0)
>   {
>   	CamApp::app_ = this;
>   }

Patch
diff mbox series

diff --git a/src/cam/main.cpp b/src/cam/main.cpp
index f9a90672a474..34cbc3229563 100644
--- a/src/cam/main.cpp
+++ b/src/cam/main.cpp
@@ -56,6 +56,7 @@  private:
 CamApp *CamApp::app_ = nullptr;
 
 CamApp::CamApp()
+	: loopUsers_(0)
 {
 	CamApp::app_ = this;
 }