mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Add null ptr check to fix bug 59281. r=adamlock sr=waterson
This commit is contained in:
parent
37c216df3d
commit
fa23038df9
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user