aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/EphyBrowser.cpp
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-12-05 07:05:41 +0800
committerChristian Persch <chpe@src.gnome.org>2003-12-05 07:05:41 +0800
commitfc33bbddd1ef2214ed431b3bf537e8c7346047c3 (patch)
treef44d23b6f31d8b592588575c4f8951f003d87f5d /embed/mozilla/EphyBrowser.cpp
parent20fb6f14a56e77e029d9cbd583faf743f5b927e4 (diff)
downloadgsoc2013-epiphany-fc33bbddd1ef2214ed431b3bf537e8c7346047c3.tar
gsoc2013-epiphany-fc33bbddd1ef2214ed431b3bf537e8c7346047c3.tar.gz
gsoc2013-epiphany-fc33bbddd1ef2214ed431b3bf537e8c7346047c3.tar.bz2
gsoc2013-epiphany-fc33bbddd1ef2214ed431b3bf537e8c7346047c3.tar.lz
gsoc2013-epiphany-fc33bbddd1ef2214ed431b3bf537e8c7346047c3.tar.xz
gsoc2013-epiphany-fc33bbddd1ef2214ed431b3bf537e8c7346047c3.tar.zst
gsoc2013-epiphany-fc33bbddd1ef2214ed431b3bf537e8c7346047c3.zip
Add some missing NULL checks.
2003-12-04 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/EphyBrowser.cpp: Add some missing NULL checks.
Diffstat (limited to 'embed/mozilla/EphyBrowser.cpp')
-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)