From b8cfc3cf0ccd5139dd46ae6d9a7cbc15b7645816 Mon Sep 17 00:00:00 2001 From: "louie.zhao%sun.com" Date: Tue, 23 Mar 2004 03:05:31 +0000 Subject: [PATCH] Bug 237957 Set GNOME_ACCESSIBILITY=1, mozilla crash when visiting http://house.sinoi.com/ r = kyle.yuan@sun.com sr = henry.jia@sun.com --- accessible/src/atk/nsAccessibleHyperText.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/accessible/src/atk/nsAccessibleHyperText.cpp b/accessible/src/atk/nsAccessibleHyperText.cpp index 5090ae10b52e..2a42dd6f1880 100644 --- a/accessible/src/atk/nsAccessibleHyperText.cpp +++ b/accessible/src/atk/nsAccessibleHyperText.cpp @@ -73,11 +73,14 @@ nsAccessibleHyperText::nsAccessibleHyperText(nsIDOMNode* aDomNode, nsIWeakRefere nsCOMPtr content(do_QueryInterface(aDomNode)); shell->GetPrimaryFrameFor(content, &frame); nsIFrame *parentFrame = nsAccessible::GetParentBlockFrame(frame); - nsCOMPtr presContext; - shell->GetPresContext(getter_AddRefs(presContext)); - nsIFrame* childFrame = parentFrame->GetFirstChild(nsnull); - PRBool bSave = PR_FALSE; - GetAllTextChildren(presContext, childFrame, aDomNode, bSave); + NS_ASSERTION(parentFrame, "Error: HypeText can't get parent block frame"); + if (parentFrame) { + nsCOMPtr presContext; + shell->GetPresContext(getter_AddRefs(presContext)); + nsIFrame* childFrame = parentFrame->GetFirstChild(nsnull); + PRBool bSave = PR_FALSE; + GetAllTextChildren(presContext, childFrame, aDomNode, bSave); + } } } }