From 591ed3c87cba07b28fe91eec0fd6bb5d3d9d2ec8 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Mon, 20 Dec 2004 18:30:14 +0000 Subject: Don't crash if trying to get the document type before the widget is 2004-12-20 Christian Persch * embed/mozilla/EphyBrowser.cpp: Don't crash if trying to get the document type before the widget is realised. --- embed/mozilla/EphyBrowser.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'embed/mozilla/EphyBrowser.cpp') 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 domDoc; rv = GetDocument (getter_AddRefs (domDoc)); -- cgit v1.2.3