improve vipsthumbnail with broken images

if there was an incorrect embedded profile, no fallback import profile,
and an export profile, vipsthumbnail could crash

see https://github.com/jcupitt/libvips/issues/186
This commit is contained in:
John Cupitt 2014-11-28 17:54:01 +00:00
parent ffe90ef38a
commit 9be2d6cc8d
1 changed files with 5 additions and 1 deletions

View File

@ -575,7 +575,11 @@ thumbnail_shrink( VipsObject *process, VipsImage *in,
out = t[7];
}
in = out;
/* If the embedded profile failed and there's no fallback or
* the fallback failed, out will still be NULL.
*/
if( out )
in = out;
}
/* If we are upsampling, don't sharpen, since nearest looks dumb