Skip to content

Commit

Permalink
Merge pull request #8400 from radarhere/geometry
Browse files Browse the repository at this point in the history
Check image value before use
  • Loading branch information
mergify[bot] authored Sep 28, 2024
2 parents ed143f5 + e9f831d commit c6e07d0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libImaging/Geometry.c
Original file line number Diff line number Diff line change
Expand Up @@ -791,15 +791,15 @@ ImagingGenericTransform(
char *out;
double xx, yy;

if (!imOut || !imIn || strcmp(imIn->mode, imOut->mode) != 0) {
return (Imaging)ImagingError_ModeError();
}

ImagingTransformFilter filter = getfilter(imIn, filterid);
if (!filter) {
return (Imaging)ImagingError_ValueError("bad filter number");
}

if (!imOut || !imIn || strcmp(imIn->mode, imOut->mode) != 0) {
return (Imaging)ImagingError_ModeError();
}

ImagingCopyPalette(imOut, imIn);

ImagingSectionEnter(&cookie);
Expand Down

0 comments on commit c6e07d0

Please sign in to comment.