From 4a734f774ac633a99d193b7fdc2b2f9d89410d77 Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Tue, 13 Jul 2010 14:54:42 +0000 Subject: [PATCH] fixed ds-graphscan test (trac #461) --- tests/cxcore/src/adatastruct.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/cxcore/src/adatastruct.cpp b/tests/cxcore/src/adatastruct.cpp index 4feac3decb..fe1aeffe42 100644 --- a/tests/cxcore/src/adatastruct.cpp +++ b/tests/cxcore/src/adatastruct.cpp @@ -2274,13 +2274,13 @@ void CxCore_GraphScanTest::run( int ) if( !vtx_mask || vtx_mask->cols < graph->active_count ) { cvReleaseMat( &vtx_mask ); - CV_CALL( vtx_mask = cvCreateMat( 1, graph->active_count, CV_8UC1 )); + CV_CALL( vtx_mask = cvCreateMat( 1, MAX(graph->active_count, 1), CV_8UC1 )); } if( !edge_mask || edge_mask->cols < graph->edges->active_count ) { cvReleaseMat( &edge_mask ); - CV_CALL( edge_mask = cvCreateMat( 1, graph->edges->active_count, CV_8UC1 )); + CV_CALL( edge_mask = cvCreateMat( 1, MAX(graph->edges->active_count, 1), CV_8UC1 )); } cvZero( vtx_mask );