Bug 1187386 (Part 3) - Don't destroy Decoder::mImage if Decoder::mImage is null. r=tn

This commit is contained in:
Seth Fowler 2015-07-31 07:29:07 -07:00
parent 7be9d06461
commit 84829858fc

View File

@ -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<nsIThread> mainThread = do_GetMainThread();