diff options
-rw-r--r-- | vcl/source/filter/jpeg/jpegc.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/vcl/source/filter/jpeg/jpegc.c b/vcl/source/filter/jpeg/jpegc.c index 0f92948b45da..7e2ae48fe264 100644 --- a/vcl/source/filter/jpeg/jpegc.c +++ b/vcl/source/filter/jpeg/jpegc.c @@ -194,7 +194,14 @@ void ReadJPEG( void* pJPEGReader, void* pIStm, long* pLines ) } } - jpeg_finish_decompress( &cinfo ); + if ( pDIB ) + { + jpeg_finish_decompress( &cinfo ); + } + else + { + jpeg_abort_decompress( &cinfo ); + } if (pScanLineBuffer!=NULL) { rtl_freeMemory( pScanLineBuffer ); pScanLineBuffer=NULL; |