fixed sdl_image error checking