From 052313ad94df54fe48789406196e61d25df8f1a2 Mon Sep 17 00:00:00 2001 From: "timeless%mozdev.org" Date: Wed, 28 Apr 2004 14:38:27 +0000 Subject: [PATCH] Bug 136016 'Set as wallpaper' should be disabled for broken image - M140RC1 M140BR [@ nsWindowsHooks::SetImageAsWallpaper] patch by ajschult@mindspring.com r=timeless sr=darin git-svn-id: svn://10.0.0.236/trunk@155636 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpfe/components/winhooks/nsWindowsHooks.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mozilla/xpfe/components/winhooks/nsWindowsHooks.cpp b/mozilla/xpfe/components/winhooks/nsWindowsHooks.cpp index ddad9d79e73..779d923ed92 100644 --- a/mozilla/xpfe/components/winhooks/nsWindowsHooks.cpp +++ b/mozilla/xpfe/components/winhooks/nsWindowsHooks.cpp @@ -951,7 +951,8 @@ nsWindowsHooks::SetImageAsWallpaper(nsIDOMElement* aElement, PRBool aUseBackgrou if (!request) return rv; nsCOMPtr container; rv = request->GetImage(getter_AddRefs(container)); - if (!request) return rv; + if (!container) + return NS_ERROR_FAILURE; // get the current frame, which holds the image data container->GetCurrentFrame(getter_AddRefs(gfxFrame));