aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla
diff options
context:
space:
mode:
Diffstat (limited to 'embed/mozilla')
-rw-r--r--embed/mozilla/EphyBrowser.cpp17
1 files changed, 11 insertions, 6 deletions
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)