aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-12-21 02:30:14 +0800
committerChristian Persch <chpe@src.gnome.org>2004-12-21 02:30:14 +0800
commit591ed3c87cba07b28fe91eec0fd6bb5d3d9d2ec8 (patch)
tree04a03d3ecdcb891214d1ee8f4c013303614b20bf /embed
parent4d16d48d1b151abe8d3afc2e01afab76177d0095 (diff)
downloadgsoc2013-epiphany-591ed3c87cba07b28fe91eec0fd6bb5d3d9d2ec8.tar
gsoc2013-epiphany-591ed3c87cba07b28fe91eec0fd6bb5d3d9d2ec8.tar.gz
gsoc2013-epiphany-591ed3c87cba07b28fe91eec0fd6bb5d3d9d2ec8.tar.bz2
gsoc2013-epiphany-591ed3c87cba07b28fe91eec0fd6bb5d3d9d2ec8.tar.lz
gsoc2013-epiphany-591ed3c87cba07b28fe91eec0fd6bb5d3d9d2ec8.tar.xz
gsoc2013-epiphany-591ed3c87cba07b28fe91eec0fd6bb5d3d9d2ec8.tar.zst
gsoc2013-epiphany-591ed3c87cba07b28fe91eec0fd6bb5d3d9d2ec8.zip
Don't crash if trying to get the document type before the widget is
2004-12-20 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/EphyBrowser.cpp: Don't crash if trying to get the document type before the widget is realised.
Diffstat (limited to 'embed')
-rw-r--r--embed/mozilla/EphyBrowser.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/embed/mozilla/EphyBrowser.cpp b/embed/mozilla/EphyBrowser.cpp
index 051b4d955..9da900f57 100644
--- a/embed/mozilla/EphyBrowser.cpp
+++ b/embed/mozilla/EphyBrowser.cpp
@@ -1138,6 +1138,8 @@ EphyBrowser::GetDocumentType ()
{
EmbedDocumentType type = EMBED_DOCUMENT_OTHER;
+ NS_ENSURE_TRUE (mDOMWindow, type);
+
nsresult rv;
nsCOMPtr<nsIDOMDocument> domDoc;
rv = GetDocument (getter_AddRefs (domDoc));