Fix crash when opening a folder containing dng files with corrupted thumbs, fixes #3129

This commit is contained in:
heckflosse
2016-02-02 15:31:30 +01:00
parent 80085787a1
commit 8c3e6eab95
3 changed files with 19 additions and 1 deletions

View File

@@ -182,7 +182,7 @@ Thumbnail* Thumbnail::loadQuickFromRaw (const Glib::ustring& fname, RawMetaDataL
if ( (unsigned char)data[1] == 0xd8 ) {
err = img->loadJPEGFromMemory(data, ri->get_thumbLength());
} else {
} else if (ri->is_ppmThumb()) {
err = img->loadPPMFromMemory(data, ri->get_thumbWidth(), ri->get_thumbHeight(), ri->get_thumbSwap(), ri->get_thumbBPS());
}
}