|
|
@ -6649,7 +6649,15 @@ static void *stbi__load_gif_main(stbi__context *s, int **delays, int *x, int *y, |
|
|
|
stride = g.w * g.h * 4;
|
|
|
|
stride = g.w * g.h * 4;
|
|
|
|
|
|
|
|
|
|
|
|
if (out) { |
|
|
|
if (out) { |
|
|
|
out = (stbi_uc*) STBI_REALLOC( out, layers * stride );
|
|
|
|
void *tmp = (stbi_uc*) STBI_REALLOC( out, layers * stride ); |
|
|
|
|
|
|
|
if (NULL == tmp) { |
|
|
|
|
|
|
|
STBI_FREE(g.out); |
|
|
|
|
|
|
|
STBI_FREE(g.history); |
|
|
|
|
|
|
|
STBI_FREE(g.background); |
|
|
|
|
|
|
|
return stbi__errpuc("outofmem", "Out of memory"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
out = tmp; |
|
|
|
if (delays) { |
|
|
|
if (delays) { |
|
|
|
*delays = (int*) STBI_REALLOC( *delays, sizeof(int) * layers );
|
|
|
|
*delays = (int*) STBI_REALLOC( *delays, sizeof(int) * layers );
|
|
|
|
} |
|
|
|
} |
|
|
|