aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
Diffstat (limited to 'embed')
-rw-r--r--embed/mozilla/EphyBrowser.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/embed/mozilla/EphyBrowser.cpp b/embed/mozilla/EphyBrowser.cpp
index 08b81190a..a105987b3 100644
--- a/embed/mozilla/EphyBrowser.cpp
+++ b/embed/mozilla/EphyBrowser.cpp
@@ -522,6 +522,7 @@ nsresult EphyBrowser::GetDocumentUrl (nsCString &url)
nsCOMPtr<nsIURI> uri;
doc->GetDocumentURL(getter_AddRefs(uri));
#endif
+ if (!uri) return NS_ERROR_FAILURE;
return uri->GetSpec (url);
}
@@ -545,10 +546,9 @@ nsresult EphyBrowser::GetTargetDocumentUrl (nsCString &url)
nsCOMPtr<nsIURI> uri;
doc->GetDocumentURL(getter_AddRefs(uri));
#endif
+ if (!uri) return NS_ERROR_FAILURE;
- uri->GetSpec (url);
-
- return NS_OK;
+ return uri->GetSpec (url);
}
nsresult EphyBrowser::ForceEncoding (const char *encoding)