pinkerton/scc/hyatt, plug a leak for bug 4127 and fix a crasher when the desired broadcaster isn't found.

This commit is contained in:
pinkerton%netscape.com 1999-04-30 21:55:45 +00:00
Родитель cca023f652
Коммит c6d8b1badc
1 изменённых файлов: 5 добавлений и 5 удалений

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

@ -628,7 +628,7 @@ nsBrowserAppCore::LoadInitialPage(void)
nsCOMPtr<nsIDOMElement> argsElement;
rv = FindNamedXULElement(mWebShell, "args", &argsElement);
if (rv != NS_OK) {
if (!argsElement) {
// Couldn't get the "args" element from the xul file. Load a blank page
if (APP_DEBUG) printf("Couldn't find args element\n");
nsString * url = new nsString("about:blank");
@ -679,11 +679,11 @@ nsBrowserAppCore::SetContentWindow(nsIDOMWindow* aWin)
return NS_ERROR_FAILURE;
}
nsIWebShell * webShell;
globalObj->GetWebShell(&webShell);
if (nsnull != webShell) {
nsCOMPtr<nsIWebShell> webShell;
globalObj->GetWebShell(getter_AddRefs(webShell));
if (webShell) {
mContentAreaWebShell = webShell;
NS_ADDREF(webShell);
NS_ADDREF(mContentAreaWebShell);
webShell->SetDocLoaderObserver((nsIDocumentLoaderObserver *)this);
const PRUnichar * name;