From 3656e0248aa1fb02b0919baa05fc1f8c4fb5c650 Mon Sep 17 00:00:00 2001 From: Luis de Bethencourt Date: Wed, 4 Feb 2015 11:52:26 +0000 Subject: [PATCH] motioncells: initialize class variables Some variables are not initialized in the constructor. It is highly unlikely they are used before being set, but it is safer to initialize them. CID #1197704 --- ext/opencv/MotionCells.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ext/opencv/MotionCells.cpp b/ext/opencv/MotionCells.cpp index 5eaa67feda..449fe24eed 100644 --- a/ext/opencv/MotionCells.cpp +++ b/ext/opencv/MotionCells.cpp @@ -75,7 +75,12 @@ MotionCells::MotionCells () m_beta = 0.5; m_useAlpha = false; m_isVisible = false; - + m_pCells = NULL; + m_gridx = 0; + m_gridy = 0; + m_cellwidth = 0; + m_cellheight = 0; + m_sensitivity = 0; } MotionCells::~MotionCells ()