Skip to content

Commit

Permalink
Merge pull request #4 from mattn/avoid-crash
Browse files Browse the repository at this point in the history
Avoid crash
  • Loading branch information
saitoha committed Sep 24, 2014
2 parents 414cbbb + dcfeac8 commit d02f1e3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion converters/loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,9 @@ load_image_file(char const *filename, int *psx, int *psy,
}
free(chunk.buffer);

arrange_pixelformat(pixels, *psx, *psy * *pframe_count, comp, stride);
if (pixels) {
arrange_pixelformat(pixels, *psx, *psy * *pframe_count, comp, stride);
}

return pixels;
}
Expand Down

0 comments on commit d02f1e3

Please sign in to comment.