Bug 749964. Don't try to save if what we have is not a real document object. r=khuey

This commit is contained in:
Boris Zbarsky 2012-10-05 22:39:46 -04:00
Родитель 1f19f8c07e
Коммит 35a0e7fdc1
1 изменённых файлов: 3 добавлений и 0 удалений

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

@ -1517,6 +1517,9 @@ nsresult nsWebBrowserPersist::SaveDocumentInternal(
// Persist the main document
nsCOMPtr<nsIDocument> doc(do_QueryInterface(aDocument));
if (!doc) {
return NS_ERROR_UNEXPECTED;
}
mURI = doc->GetDocumentURI();
nsCOMPtr<nsIURI> oldBaseURI = mCurrentBaseURI;