Commit f676bfb3 authored by Vladislav Vinogradov's avatar Vladislav Vinogradov

fix GpuMat::setTo method in case if mask is empty:

it might be called from _OutputArray::setTo
parent df57d038
......@@ -390,6 +390,11 @@ GpuMat& cv::cuda::GpuMat::setTo(Scalar value, InputArray _mask, Stream& stream)
GpuMat mask = _mask.getGpuMat();
if (mask.empty())
{
return setTo(value, stream);
}
CV_DbgAssert( size() == mask.size() && mask.type() == CV_8UC1 );
typedef void (*func_t)(const GpuMat& mat, const GpuMat& mask, Scalar scalar, Stream& stream);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment