Adding check for null document. Prevents crash described in bug 20677.
r=brendan@mozilla.org git-svn-id: svn://10.0.0.236/trunk@55596 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -2819,6 +2819,9 @@ nsTextFrame::Reflow(nsIPresContext* aPresContext,
|
||||
// Setup text transformer to transform this frames text content
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
mContent->GetDocument(*getter_AddRefs(doc));
|
||||
if (NS_WARN_IF_FALSE(doc, "Content has no document.")) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
nsCOMPtr<nsILineBreaker> lb;
|
||||
doc->GetLineBreaker(getter_AddRefs(lb));
|
||||
nsTextTransformer tx(lb, nsnull);
|
||||
|
||||
Reference in New Issue
Block a user