Commit d2b093d8 authored by Vladislav Vinogradov's avatar Vladislav Vinogradov

fixed potential dereference of null pointer

parent ce2284e2
......@@ -429,10 +429,11 @@ void CvBlobTrackerAuto1::Process(IplImage* pImg, IplImage* pMask)
for(i=0; i<NewBlobList.GetBlobNum(); ++i)
{
CvBlob* pBN = NewBlobList.GetBlob(i);
pBN->ID = m_NextBlobID;
if(pBN && pBN->w >= CV_BLOB_MINW && pBN->h >= CV_BLOB_MINH)
{
pBN->ID = m_NextBlobID;
CvBlob* pB = m_pBT->AddBlob(pBN, pImg, pmask );
if(pB)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment