mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-15 06:07:33 +03:00
Merge pull request #8400 from radarhere/geometry
Check image value before use
This commit is contained in:
commit
c6e07d0272
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user