Add null ptr check to fix bug 59281. r=adamlock sr=waterson
git-svn-id: svn://10.0.0.236/trunk@82422 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -2855,6 +2855,10 @@ NS_IMETHODIMP nsDocShell::SetupNewViewer(nsIContentViewer* aNewViewer)
|
||||
|
||||
nsCOMPtr<nsIWidget> widget;
|
||||
NS_ENSURE_SUCCESS(GetMainWidget(getter_AddRefs(widget)), NS_ERROR_FAILURE);
|
||||
if (!widget) {
|
||||
NS_ERROR("GetMainWidget coughed up a null widget");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsRect bounds(x, y, cx, cy);
|
||||
NS_ENSURE_SUCCESS(EnsureDeviceContext(), NS_ERROR_FAILURE);
|
||||
|
||||
Reference in New Issue
Block a user