From 0dfaa7fc028545fc11644df132464786ee94b8ee Mon Sep 17 00:00:00 2001 From: "tbogard%aol.net" Date: Wed, 17 Nov 1999 04:19:39 +0000 Subject: [PATCH] Fixed a warning. git-svn-id: svn://10.0.0.236/trunk@53747 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/base/nsWebShell.cpp | 5 +++-- mozilla/webshell/src/nsWebShell.cpp | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/mozilla/docshell/base/nsWebShell.cpp b/mozilla/docshell/base/nsWebShell.cpp index c89c318b5bd..f2df548db67 100644 --- a/mozilla/docshell/base/nsWebShell.cpp +++ b/mozilla/docshell/base/nsWebShell.cpp @@ -1361,12 +1361,13 @@ NS_IMETHODIMP nsWebShell::GetTopLevelWindow(nsIWebShellContainer** aTopLevelWindow) { NS_ENSURE_ARG_POINTER(aTopLevelWindow); - *aTopLevelWindow; + *aTopLevelWindow = nsnull; nsCOMPtr rootWebShell; GetRootWebShellEvenIfChrome(getter_AddRefs(rootWebShell)); - NS_ENSURE_TRUE(rootWebShell, NS_OK); + if(!rootWebShell) + return NS_OK; nsCOMPtr rootContainer; rootWebShell->GetContainer(*aTopLevelWindow); diff --git a/mozilla/webshell/src/nsWebShell.cpp b/mozilla/webshell/src/nsWebShell.cpp index c89c318b5bd..f2df548db67 100644 --- a/mozilla/webshell/src/nsWebShell.cpp +++ b/mozilla/webshell/src/nsWebShell.cpp @@ -1361,12 +1361,13 @@ NS_IMETHODIMP nsWebShell::GetTopLevelWindow(nsIWebShellContainer** aTopLevelWindow) { NS_ENSURE_ARG_POINTER(aTopLevelWindow); - *aTopLevelWindow; + *aTopLevelWindow = nsnull; nsCOMPtr rootWebShell; GetRootWebShellEvenIfChrome(getter_AddRefs(rootWebShell)); - NS_ENSURE_TRUE(rootWebShell, NS_OK); + if(!rootWebShell) + return NS_OK; nsCOMPtr rootContainer; rootWebShell->GetContainer(*aTopLevelWindow);