diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | embed/mozilla/EphyBrowser.cpp | 17 |
2 files changed, 18 insertions, 6 deletions
@@ -1,3 +1,10 @@ +2006-02-15 Christian Persch <chpe@cvs.gnome.org> + + * embed/mozilla/EphyBrowser.cpp: + + Guard against nsDocument::GetDefaultView returning NULL. + Bug #327764. + 2006-02-10 Peter Harvey <peter.a.harvey@gmail.com> * data/ui/epiphany-toolbar.xml diff --git a/embed/mozilla/EphyBrowser.cpp b/embed/mozilla/EphyBrowser.cpp index 6a97f026a..6be7da0d4 100644 --- a/embed/mozilla/EphyBrowser.cpp +++ b/embed/mozilla/EphyBrowser.cpp @@ -1286,9 +1286,12 @@ nsresult EphyBrowser::GetDocumentHasModifiedForms (nsIDOMDocument *aDomDoc, PRUi PRBool isVisible = PR_FALSE; nsresult rv; computedStyle = nsnull; - rv = defaultCSSView->GetComputedStyle (formElement, EmptyString, - getter_AddRefs (computedStyle)); - if (NS_SUCCEEDED (rv) && computedStyle) + + /* Check defaultCSSView for NULL, see bug #327764 */ + if (defaultCSSView && + NS_SUCCEEDED (defaultCSSView->GetComputedStyle (formElement, EmptyString, + getter_AddRefs (computedStyle))) && + computedStyle) { rv = computedStyle->GetPropertyCSSValue(visibilityAttr, getter_AddRefs (cssValue)); if (NS_SUCCEEDED (rv) && cssValue) @@ -1328,9 +1331,11 @@ nsresult EphyBrowser::GetDocumentHasModifiedForms (nsIDOMDocument *aDomDoc, PRUi isVisible = PR_FALSE; computedStyle = nsnull; - rv = defaultCSSView->GetComputedStyle (domElement, EmptyString, - getter_AddRefs (computedStyle)); - if (NS_SUCCEEDED (rv) && computedStyle) + /* Check defaultCSSView for NULL, see bug #327764 */ + if (defaultCSSView && + NS_SUCCEEDED (defaultCSSView->GetComputedStyle (domElement, EmptyString, + getter_AddRefs (computedStyle))) && + computedStyle) { rv = computedStyle->GetPropertyCSSValue(visibilityAttr, getter_AddRefs (cssValue)); if (NS_SUCCEEDED (rv) && cssValue) |