diff options
Diffstat (limited to 'ext/gd/libgd/gd_gif_in.c')
-rw-r--r-- | ext/gd/libgd/gd_gif_in.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/gd/libgd/gd_gif_in.c b/ext/gd/libgd/gd_gif_in.c index 76ba152035..7156e4b8e0 100644 --- a/ext/gd/libgd/gd_gif_in.c +++ b/ext/gd/libgd/gd_gif_in.c @@ -261,10 +261,6 @@ terminated: if (!im) { return 0; } - if (!im->colorsTotal) { - gdImageDestroy(im); - return 0; - } /* Check for open colors at the end, so we can reduce colorsTotal and ultimately BitsPerPixel */ @@ -275,6 +271,10 @@ terminated: break; } } + if (!im->colorsTotal) { + gdImageDestroy(im); + return 0; + } return im; } /* }}} */ @@ -375,7 +375,7 @@ static int GetCode_(gdIOCtx *fd, CODE_STATIC_DATA *scd, int code_size, int flag, int *ZeroDataBlockP) { int i, j, ret; - unsigned char count; + int count; if (flag) { scd->curbit = 0; |