Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion stb_image.h
Original file line number Diff line number Diff line change
Expand Up @@ -7060,8 +7060,10 @@ static void *stbi__gif_load(stbi__context *s, int *x, int *y, int *comp, int req

// moved conversion to after successful load so that the same
// can be done for multiple frames.
if (req_comp && req_comp != 4)
if (req_comp && req_comp != 4) {
u = stbi__convert_format(u, 4, req_comp, g.w, g.h);
g.out = NULL;
}
} else if (g.out) {
// if there was an error and we allocated an image buffer, free it!
STBI_FREE(g.out);
Expand Down