diff --git a/mozilla/dom/src/base/nsGlobalWindow.cpp b/mozilla/dom/src/base/nsGlobalWindow.cpp index 7cdc866a48d..37f4debd323 100644 --- a/mozilla/dom/src/base/nsGlobalWindow.cpp +++ b/mozilla/dom/src/base/nsGlobalWindow.cpp @@ -290,7 +290,7 @@ NS_IMETHODIMP GlobalWindowImpl::GetDocument(nsIDOMDocument** aDocument) { *aDocument = mDocument; - NS_ADDREF(mDocument); + NS_IF_ADDREF(mDocument); return NS_OK; }