Fixed several issues found by static analysis

This commit is contained in:
Maksim Shabunin
2017-06-28 16:26:55 +03:00
parent bbb14d3746
commit a769d69a9d
35 changed files with 113 additions and 66 deletions
+2
View File
@@ -494,6 +494,7 @@ void EmdL1::initBVTree()
}
if(pNxtN != pCurN->pParent)
{
CV_Assert(pNxtN != NULL);
pNxtE = pNxtN->pChild;
if(pNxtE && pNxtE->pChild==pCurN) // has connection
{
@@ -592,6 +593,7 @@ void EmdL1::findNewSolution()
findLoopFromEnterBV();
// Modify flow values along the loop
cvPEmdEdge pE = NULL;
CV_Assert(m_pLeave != NULL);
float minFlow = m_pLeave->flow;
int k;
for(k=0; k<m_iFrom; k++)