Skip to content

Commit

Permalink
bug 304896: Null check mNavigator when we set it, since it isn't guar…
Browse files Browse the repository at this point in the history
…anteed to be non-null. r+sr=jst
  • Loading branch information
mrbkap%gmail.com committed Aug 19, 2005
1 parent 0d0950b commit 0b8f97b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dom/src/base/nsGlobalWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -948,9 +948,11 @@ nsGlobalWindow::SetNewDocument(nsIDOMDocument* aDocument,
mInnerWindowHolder = wsh->GetInnerWindowHolder();
mNavigator = wsh->GetNavigator(); // This assignment addrefs.

// Update mNavigator's docshell pointer now.
mNavigator->SetDocShell(mDocShell);
mNavigator->LoadingNewDocument();
if (mNavigator) {
// Update mNavigator's docshell pointer now.
mNavigator->SetDocShell(mDocShell);
mNavigator->LoadingNewDocument();
}
} else {
if (thisChrome) {
newInnerWindow = new nsGlobalChromeWindow(this);
Expand Down

0 comments on commit 0b8f97b

Please sign in to comment.