1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-21 19:33:03 +04:00

Merge pull request #26769 from y-guyon:patch-1

Avoid adding value to nullptr
This commit is contained in:
Alexander Smorkalov
2025-01-14 19:06:52 +03:00
committed by GitHub
+2 -2
View File
@@ -1048,9 +1048,9 @@ static void remapLanczos4( const Mat& _src, Mat& _dst, const Mat& _xy,
const int off_x = isRelative ? (_offset.x+dx) : 0;
int sx = XY[dx*2]-3+off_x, sy = XY[dx*2+1]-3+off_y;
const AT* w = wtab + FXY[dx]*64;
const T* S = S0 + sy*sstep + sx*cn;
if( (unsigned)sx < width1 && (unsigned)sy < height1 )
{
const T* S = S0 + sy*sstep + sx*cn;
for(int k = 0; k < cn; k++ )
{
WT sum = 0;
@@ -1091,9 +1091,9 @@ static void remapLanczos4( const Mat& _src, Mat& _dst, const Mat& _xy,
for(int i = 0; i < 8; i++, w += 8 )
{
int yi = y[i];
const T* S1 = S0 + yi*sstep;
if( yi < 0 )
continue;
const T* S1 = S0 + yi*sstep;
if( x[0] >= 0 )
sum += (S1[x[0]] - cv)*w[0];
if( x[1] >= 0 )