From 98f090e390313c0f3073187cd2775dfcb3d40ffc Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Wed, 18 May 2011 13:05:46 +0000 Subject: [PATCH] fixed bug with crash in HoughCircles & HoughLines when no circles/lines are detected (ticket #1066) --- modules/imgproc/src/hough.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/imgproc/src/hough.cpp b/modules/imgproc/src/hough.cpp index 51d32602ee..b1a96715e8 100644 --- a/modules/imgproc/src/hough.cpp +++ b/modules/imgproc/src/hough.cpp @@ -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();