From c5a5b0286f266c7d6d097258a835a4756ea50c98 Mon Sep 17 00:00:00 2001 From: James Zern Date: Mon, 27 Jan 2014 20:33:05 -0800 Subject: [PATCH] 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 --- src/dec/frame.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dec/frame.c b/src/dec/frame.c index e1eea94e..cf541cc8 100644 --- a/src/dec/frame.c +++ b/src/dec/frame.c @@ -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