aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--embed/mozilla/EphyBrowser.cpp2
-rw-r--r--embed/mozilla/mozilla-embed.cpp2
3 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 9b75387b2..763b520f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2004-04-28 Marco Pesenti Gritti <marco@gnome.org>
+
+ * embed/mozilla/EphyBrowser.cpp:
+ * embed/mozilla/mozilla-embed.cpp:
+
+ Ensure we have a DOM window before trying to
+ get his url. The check was not working anymore
+ because of initialization changes.
+
2004-04-28 Pablo Saratxaga <pablo@mandrakesoft.com>
* help/eu/: added Basque help files from
diff --git a/embed/mozilla/EphyBrowser.cpp b/embed/mozilla/EphyBrowser.cpp
index 018293bfb..5a1cb95dc 100644
--- a/embed/mozilla/EphyBrowser.cpp
+++ b/embed/mozilla/EphyBrowser.cpp
@@ -633,6 +633,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);
diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp
index b8f00932b..ca0508f4c 100644
--- a/embed/mozilla/mozilla-embed.cpp
+++ b/embed/mozilla/mozilla-embed.cpp
@@ -485,8 +485,6 @@ impl_get_location (EphyEmbed *embed,
nsresult rv;
nsCAutoString url;
- if (mpriv->browser == NULL) return NULL;
-
if (toplevel)
{
rv = mpriv->browser->GetDocumentUrl (url);