From adb2040980e61a4bf76675c163c0ada20809a7e2 Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Tue, 3 Dec 2013 15:55:47 +0400 Subject: [PATCH] added additional check in cv::gpu::demosaicing that source is not empty --- modules/gpu/src/color.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gpu/src/color.cpp b/modules/gpu/src/color.cpp index 76793d5200..864c4755ea 100644 --- a/modules/gpu/src/color.cpp +++ b/modules/gpu/src/color.cpp @@ -1863,7 +1863,7 @@ void cv::gpu::demosaicing(const GpuMat& src, GpuMat& dst, int code, int dcn, Str { const int depth = src.depth(); - CV_Assert( src.channels() == 1 ); + CV_Assert( src.channels() == 1 && !src.empty() ); switch (code) {