From f5c729396db02dce79dca9242aca3777da1da58d Mon Sep 17 00:00:00 2001 From: vbystricky Date: Tue, 22 Apr 2014 10:50:35 +0400 Subject: [PATCH] Fix call of ippiConvert. --- modules/core/src/convert.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/modules/core/src/convert.cpp b/modules/core/src/convert.cpp index e73dfef590..1ca53da5ef 100644 --- a/modules/core/src/convert.cpp +++ b/modules/core/src/convert.cpp @@ -1084,9 +1084,12 @@ dtype* dst, size_t dstep, Size size, double* scale) \ static void cvt##suffix( const stype* src, size_t sstep, const uchar*, size_t, \ dtype* dst, size_t dstep, Size size, double*) \ { \ - if (ippiConvert_##ippFavor(src, (int)sstep, dst, (int)dstep, ippiSize(size.width, size.height)) >= 0) \ - return; \ - setIppErrorStatus(); \ + if (src && sstep && dst && dstep && size.width && size.height)\ + {\ + if (ippiConvert_##ippFavor(src, (int)sstep, dst, (int)dstep, ippiSize(size.width, size.height)) >= 0) \ + return; \ + setIppErrorStatus(); \ + }\ cvt_(src, sstep, dst, dstep, size); \ } @@ -1094,9 +1097,12 @@ static void cvt##suffix( const stype* src, size_t sstep, const uchar*, size_t, \ static void cvt##suffix( const stype* src, size_t sstep, const uchar*, size_t, \ dtype* dst, size_t dstep, Size size, double*) \ { \ - if (ippiConvert_##ippFavor(src, (int)sstep, dst, (int)dstep, ippiSize(size.width, size.height), ippRndFinancial, 0) >= 0) \ - return; \ - setIppErrorStatus(); \ + if (src && sstep && dst && dstep && size.width && size.height)\ + {\ + if (ippiConvert_##ippFavor(src, (int)sstep, dst, (int)dstep, ippiSize(size.width, size.height), ippRndFinancial, 0) >= 0) \ + return; \ + setIppErrorStatus(); \ + }\ cvt_(src, sstep, dst, dstep, size); \ } #else