aboutsummaryrefslogtreecommitdiffstats
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
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.
-rw-r--r--ChangeLog6
-rw-r--r--embed/mozilla/EphyBrowser.cpp6
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 8100d7a45..01ac9def3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-12-04 Christian Persch <chpe@cvs.gnome.org>
+
+ * embed/mozilla/EphyBrowser.cpp:
+
+ Add some missing NULL checks.
+
2003-12-03 Christian Persch <chpe@cvs.gnome.org>
* lib/widgets/ephy-spinner.c:
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)