aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--embed/mozilla/EphyBrowser.cpp2
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 30b9241ff..76c60c218 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
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.
+
+2004-12-20 Christian Persch <chpe@cvs.gnome.org>
+
* configure.ac:
Post-release version bump.
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));