summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/src/fxcodec/codec/fx_codec_jpeg.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/src/fxcodec/codec/fx_codec_jpeg.cpp b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
index 0a38fc82ca..76096f36b5 100644
--- a/core/src/fxcodec/codec/fx_codec_jpeg.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
@@ -502,9 +502,13 @@ uint8_t* CCodec_JpegDecoder::v_GetNextLine() {
if (m_pExtProvider) {
return m_pExtProvider->GetNextLine(m_pExtContext);
}
+
+ if (setjmp(m_JmpBuf) == -1)
+ return nullptr;
+
int nlines = jpeg_read_scanlines(&cinfo, &m_pScanlineBuf, 1);
if (nlines < 1) {
- return NULL;
+ return nullptr;
}
return m_pScanlineBuf;
}