Fix segfault when adding files to the currently watched folder, kudos to Floessie for the fix

This commit is contained in:
heckflosse
2016-07-05 16:48:30 +02:00
parent df15f735dc
commit a991d53bf3

View File

@@ -176,7 +176,7 @@ Thumbnail* Thumbnail::loadQuickFromRaw (const Glib::ustring& fname, RawMetaDataL
int err = 1; int err = 1;
// see if it is something we support // see if it is something we support
if ( ri->is_supportedThumb() ) { if ( ri->is_supportedThumb() && ri->get_thumbOffset() < ri->get_file()->size ) {
const char* data((const char*)fdata(ri->get_thumbOffset(), ri->get_file())); const char* data((const char*)fdata(ri->get_thumbOffset(), ri->get_file()));
if ( (unsigned char)data[1] == 0xd8 ) { if ( (unsigned char)data[1] == 0xd8 ) {