From f026d74828548a2b33afd141fc03e75dd57c764a Mon Sep 17 00:00:00 2001 From: "dolske%mozilla.com" Date: Wed, 23 Jan 2008 02:14:23 +0000 Subject: [PATCH] Bug 413512 - Crash loading www.pricerunner.de [@ imgTools::EncodeScaledImage]. r=stuart, a=blocking-ff3+ --- modules/libpr0n/src/imgTools.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/libpr0n/src/imgTools.cpp b/modules/libpr0n/src/imgTools.cpp index dd822a11d2b..67f4d33cacd 100644 --- a/modules/libpr0n/src/imgTools.cpp +++ b/modules/libpr0n/src/imgTools.cpp @@ -287,6 +287,8 @@ NS_IMETHODIMP imgTools::EncodeScaledImage(imgIContainer *aContainer, nsCOMPtr frame; rv = aContainer->GetFrameAt(0, getter_AddRefs(frame)); NS_ENSURE_SUCCESS(rv, rv); + if (!frame) + return NS_ERROR_NOT_AVAILABLE; PRInt32 w,h; frame->GetWidth(&w);