diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2006-02-16 06:03:43 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2006-02-16 06:03:43 +0800 |
commit | 7c5b497dd3680e952c722aab130af23b47f31423 (patch) | |
tree | 57583cb9f52943fe35771b958f1c5e1076f907bb | |
parent | afbeb2d17381d6891309ef015af73d7fcb79a4c4 (diff) | |
download | gsoc2013-epiphany-7c5b497dd3680e952c722aab130af23b47f31423.tar.gz gsoc2013-epiphany-7c5b497dd3680e952c722aab130af23b47f31423.tar.zst gsoc2013-epiphany-7c5b497dd3680e952c722aab130af23b47f31423.zip |
Guard against nsDocument::GetDefaultView returning NULL. Bug #327764.
2006-02-15 Christian Persch <chpe@cvs.gnome.org>
* embed/mozilla/EphyBrowser.cpp:
Guard against nsDocument::GetDefaultView returning NULL.
Bug #327764.
-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) |