Change return value when no window is found to NS_OK. Init variable to NULL

This commit is contained in:
davidm%netscape.com 1999-07-23 03:14:43 +00:00
Родитель 9f0e1965fa
Коммит 3c7d624e93
1 изменённых файлов: 4 добавлений и 5 удалений

Просмотреть файл

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