From 49c01f8449372835c343fac69a24450bcb8cd828 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Thu, 12 Jun 2014 20:54:50 -0700 Subject: [PATCH] webp reader: initialize WebPDecoderConfig --- src/webp_reader.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/webp_reader.cpp b/src/webp_reader.cpp index f0adfad4f..685e83de1 100644 --- a/src/webp_reader.cpp +++ b/src/webp_reader.cpp @@ -189,6 +189,10 @@ void webp_reader::init() { WebPDecoderConfig config; config_guard guard(config); + if (!WebPInitDecoderConfig(&config)) + { + throw image_reader_exception("WEBP reader: WebPInitDecoderConfig failed"); + } if (WebPGetFeatures(buffer_->data(), buffer_->size(), &config.input) == VP8_STATUS_OK) { width_ = config.input.width; height_ = config.input.height;