ofImage + bad jpg = crash [solved]

The prob is that I want to load a bunch of files from a directory. Sometimes (not very often) some files are corrupt what makes them impossible to load.

The problem is that when I try to load them with oF the application crashes instead of returning false.

EDIT: I’ve tested that this just happens on Linux

callstack: http://pastebin.com/m1c3c0dce

EDIT2: I’ve fixed it updating the FreeImage library to 3.10. I installed ubuntu jaunty packages libfreeimage and I copied /usr/lib/libfreeimage.a and /usr/include/FreeImage.h to oF/libs/FreeImage

I also had to edit ofImage.h setting the last parameter to true of the FreeImage_ConvertToRawBits call (line 547) or the images would display upsidedown

  
FreeImage_ConvertToRawBits(pix.pixels, bmp, width*byteCount, bpp, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK, true);  // get bits  

bye!