238464 - Crash setting wallpaper to a broken image. Patch by Jon Henry, r=mconnor, a=ben

git-svn-id: svn://10.0.0.236/branches/AVIARY_1_0_20040515_BRANCH@160838 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jruderman%hmc.edu
2004-08-16 23:49:43 +00:00
parent dca55abbb6
commit 5e09f0898d

View File

@@ -708,7 +708,8 @@ nsWindowsShellService::SetDesktopBackground(nsIDOMElement* aElement,
if (!request) return rv;
nsCOMPtr<imgIContainer> 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));