Bug 32898: Fix crash when targetting new window. r=rpotts

This commit is contained in:
pollmann%netscape.com 2000-05-11 01:33:25 +00:00
Родитель 25ea7720b5
Коммит 01e6f26d4b
1 изменённых файлов: 7 добавлений и 1 удалений

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

@ -659,8 +659,14 @@ nsresult nsURILoader::SetupLoadCookie(nsISupports * aWindowContext,
} // if we don't have a load cookie already
} // if we have a cntListener
rv = loadCookie->QueryInterface(NS_GET_IID(nsIInterfaceRequestor),
// loadCookie may be null - for example, <a target="popupWin"> if popupWin is
// not a defined window. The following prevents a crash (Bug 32898)
if (loadCookie) {
rv = loadCookie->QueryInterface(NS_GET_IID(nsIInterfaceRequestor),
(void**)aLoadCookie);
} else {
rv = NS_ERROR_UNEXPECTED;
}
return rv;
}