mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
Check for empty vector to avoid throwing an exception in LineSegmentDetectorImpl::drawSegments() function.
This commit is contained in:
@@ -1076,6 +1076,10 @@ void LineSegmentDetectorImpl::drawSegments(InputOutputArray _image, InputArray l
|
||||
}
|
||||
|
||||
Mat _lines = lines.getMat();
|
||||
if (_lines.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
const int N = _lines.checkVector(4);
|
||||
|
||||
CV_Assert(_lines.depth() == CV_32F || _lines.depth() == CV_32S);
|
||||
|
||||
Reference in New Issue
Block a user