Skip to content

Commit 408ef5c

Browse files
committed
Merge pull request opencv#8288 from Jejos:bugfix_medianBlur_accessviolation
2 parents 38abc61 + 5169c79 commit 408ef5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/imgproc/src/smooth.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3494,7 +3494,7 @@ void cv::medianBlur( InputArray _src0, OutputArray _dst, int ksize )
34943494

34953495
CV_Assert( (ksize % 2 == 1) && (_src0.dims() <= 2 ));
34963496

3497-
if( ksize <= 1 )
3497+
if( ksize <= 1 || _src0.empty() )
34983498
{
34993499
_src0.copyTo(_dst);
35003500
return;

0 commit comments

Comments
 (0)