aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/mozilla-embed.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'embed/mozilla/mozilla-embed.cpp')
-rw-r--r--embed/mozilla/mozilla-embed.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp
index 5a684a54e..daeb19eaf 100644
--- a/embed/mozilla/mozilla-embed.cpp
+++ b/embed/mozilla/mozilla-embed.cpp
@@ -587,7 +587,8 @@ impl_get_location (EphyEmbed *embed,
nsCOMPtr<nsIURI> furi;
rv = uri->Clone (getter_AddRefs (furi));
- if (NS_FAILED (rv)) return NULL;
+ /* Some nsIURI impls return NS_OK even though they didn't put anything in the outparam!! */
+ if (NS_FAILED (rv) || !furi) furi.swap(uri);
/* Hide password part */
nsEmbedCString user;