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
This commit is contained in:
davidm%netscape.com
1999-07-23 03:14:43 +00:00
parent 4db5d5782e
commit bfd1f84aaf

View File

@@ -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;
}