We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f115a1 commit f1ed915Copy full SHA for f1ed915
src/IMG_webp.c
@@ -329,6 +329,9 @@ IMG_Animation *IMG_LoadWEBPAnimation_IO(SDL_IOStream *src)
329
anim->count = lib.WebPDemuxGetI(demuxer, WEBP_FF_FRAME_COUNT);
330
anim->frames = (SDL_Surface **)SDL_calloc(anim->count, sizeof(*anim->frames));
331
anim->delays = (int *)SDL_calloc(anim->count, sizeof(*anim->delays));
332
+ if (!anim->frames || !anim->delays) {
333
+ goto error;
334
+ }
335
336
canvas = SDL_CreateSurface(anim->w, anim->h, features.has_alpha ? SDL_PIXELFORMAT_RGBA32 : SDL_PIXELFORMAT_RGBX32);
337
if (!canvas) {
0 commit comments