aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/EphyBrowser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'embed/mozilla/EphyBrowser.cpp')
-rw-r--r--embed/mozilla/EphyBrowser.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/embed/mozilla/EphyBrowser.cpp b/embed/mozilla/EphyBrowser.cpp
index d09bfca5e..54697db81 100644
--- a/embed/mozilla/EphyBrowser.cpp
+++ b/embed/mozilla/EphyBrowser.cpp
@@ -604,6 +604,8 @@ nsresult EphyBrowser::GetPageDescriptor(nsISupports **aPageDescriptor)
nsresult EphyBrowser::GetDocumentUrl (nsCString &url)
{
+ if (!mDOMWindow) return NS_ERROR_FAILURE;
+
nsCOMPtr<nsIDOMDocument> DOMDocument;
mDOMWindow->GetDocument (getter_AddRefs(DOMDocument));
NS_ENSURE_TRUE (DOMDocument, NS_ERROR_FAILURE);