diff --git a/modules/imgproc/src/box_filter.dispatch.cpp b/modules/imgproc/src/box_filter.dispatch.cpp index 347cdc421e..1d23c72859 100644 --- a/modules/imgproc/src/box_filter.dispatch.cpp +++ b/modules/imgproc/src/box_filter.dispatch.cpp @@ -369,6 +369,7 @@ void boxFilter(InputArray _src, OutputArray _dst, int ddepth, CV_INSTRUMENT_REGION(); CV_Assert(!_src.empty()); + CV_Assert(ksize.width > 0 && ksize.height > 0); CV_OCL_RUN(_dst.isUMat() && (borderType == BORDER_REPLICATE || borderType == BORDER_CONSTANT ||