From: Mikko Rasa Date: Sun, 8 Jan 2017 11:40:46 +0000 (+0200) Subject: Initialize longjmp target before calling jpeg_create_decompress X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;ds=inline;h=2ce0c7fc1c33de76b816144df2978518ec6738f6;p=libs%2Fgui.git Initialize longjmp target before calling jpeg_create_decompress --- diff --git a/source/graphics/jpeg/jpegloader.cpp b/source/graphics/jpeg/jpegloader.cpp index 38df348..39866c1 100644 --- a/source/graphics/jpeg/jpegloader.cpp +++ b/source/graphics/jpeg/jpegloader.cpp @@ -91,6 +91,9 @@ JpegLoader::JpegLoader(IO::Seekable &io): priv->err_mgr.error_exit = &error_exit; priv->err_mgr.emit_message = &emit_message; + if(setjmp(priv->err_mgr.jmp)) + throw runtime_error("error creating jpeg decompressor: "+priv->err_mgr.message); + jpeg_create_decompress(&priv->jpeg); priv->jpeg.src = &priv->src_mgr;