From 84829858fce38b9f785db07ef07c1d38e184e813 Mon Sep 17 00:00:00 2001 From: Seth Fowler Date: Fri, 31 Jul 2015 07:29:07 -0700 Subject: [PATCH] Bug 1187386 (Part 3) - Don't destroy Decoder::mImage if Decoder::mImage is null. r=tn --- image/Decoder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/image/Decoder.cpp b/image/Decoder.cpp index 6f883bf4507..627c558f761 100644 --- a/image/Decoder.cpp +++ b/image/Decoder.cpp @@ -57,7 +57,7 @@ Decoder::~Decoder() "Destroying Decoder without taking all its invalidations"); mInitialized = false; - if (!NS_IsMainThread()) { + if (mImage && !NS_IsMainThread()) { // Dispatch mImage to main thread to prevent it from being destructed by the // decode thread. nsCOMPtr mainThread = do_GetMainThread();