From bfd1f84aaff73f6ce58127f78b86231970183870 Mon Sep 17 00:00:00 2001 From: "davidm%netscape.com" Date: Fri, 23 Jul 1999 03:14:43 +0000 Subject: [PATCH] Change return value when no window is found to NS_OK. Init variable to NULL git-svn-id: svn://10.0.0.236/trunk@40791 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpfe/appshell/src/nsWindowMediator.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/mozilla/xpfe/appshell/src/nsWindowMediator.cpp b/mozilla/xpfe/appshell/src/nsWindowMediator.cpp index d48c1034d98..f11ac788030 100644 --- a/mozilla/xpfe/appshell/src/nsWindowMediator.cpp +++ b/mozilla/xpfe/appshell/src/nsWindowMediator.cpp @@ -490,7 +490,7 @@ NS_IMETHODIMP nsWindowMediator::GetMostRecentWindow( const PRUnichar* inType, ns *outWindow = NULL; PRInt32 lastTimeStamp = -1; PRInt32 count = mWindowList.Count(); - nsIWebShellWindow* mostRecentWindow; + nsIWebShellWindow* mostRecentWindow = NULL; nsString typeString( inType ); // Find the most window with the highest time stamp that matches the requested type for ( int32 i = 0; i< count; i++ ) @@ -517,10 +517,9 @@ NS_IMETHODIMP nsWindowMediator::GetMostRecentWindow( const PRUnichar* inType, ns return NS_ERROR_FAILURE; } } - else - { - return NS_ERROR_FAILURE; - } + + return NS_OK; + }