fixed bug with crash in HoughCircles & HoughLines when no circles/lines are detected (ticket #1066)

This commit is contained in:
Vadim Pisarevsky 2011-05-18 13:05:46 +00:00
parent 7d350280c0
commit 98f090e390

View File

@ -1092,7 +1092,7 @@ const int STORAGE_SIZE = 1 << 12;
static void seqToMat(const CvSeq* seq, OutputArray& _arr)
{
if( seq )
if( seq && seq->total > 0 )
{
_arr.create(1, seq->total, seq->flags, -1, true);
Mat arr = _arr.getMat();