decode mt+incremental: fix segfault in debug builds

VP8GetThreadMethod() may be called with a NULL headers param; correct an
assert.

broken since:
8a2fa09 Add a second multi-thread method

Change-Id: If7b6d1b8f4ec874d343a806cee5f5e6bb6438620
This commit is contained in:
James Zern 2014-01-27 20:33:05 -08:00
parent 9882b2f953
commit c5a5b0286f

View File

@ -502,7 +502,7 @@ int VP8GetThreadMethod(const WebPDecoderOptions* const options,
(void)headers;
(void)width;
(void)height;
assert(!headers->is_lossless);
assert(headers == NULL || !headers->is_lossless);
#if defined(WEBP_USE_THREAD)
if (width < MIN_WIDTH_FOR_THREADS) return 0;
// TODO(skal): tune the heuristic further