aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2006-02-16 06:03:43 +0800
committerChristian Persch <chpe@src.gnome.org>2006-02-16 06:03:43 +0800
commit7c5b497dd3680e952c722aab130af23b47f31423 (patch)
tree57583cb9f52943fe35771b958f1c5e1076f907bb
parentafbeb2d17381d6891309ef015af73d7fcb79a4c4 (diff)
downloadgsoc2013-epiphany-7c5b497dd3680e952c722aab130af23b47f31423.tar
gsoc2013-epiphany-7c5b497dd3680e952c722aab130af23b47f31423.tar.gz
gsoc2013-epiphany-7c5b497dd3680e952c722aab130af23b47f31423.tar.bz2
gsoc2013-epiphany-7c5b497dd3680e952c722aab130af23b47f31423.tar.lz
gsoc2013-epiphany-7c5b497dd3680e952c722aab130af23b47f31423.tar.xz
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--ChangeLog7
-rw-r--r--embed/mozilla/EphyBrowser.cpp17
2 files changed, 18 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 3ac35c442..e8b17ce4e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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)