fixed bug with crash in HoughCircles & HoughLines when no circles/lines are detected...
authorVadim Pisarevsky <no@email>
Wed, 18 May 2011 13:05:46 +0000 (13:05 +0000)
committerVadim Pisarevsky <no@email>
Wed, 18 May 2011 13:05:46 +0000 (13:05 +0000)
modules/imgproc/src/hough.cpp

index 51d3260..b1a9671 100644 (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();