зеркало из https://github.com/mozilla/pjs.git
Adding check for null document. Prevents crash described in bug 20677.
r=brendan@mozilla.org
This commit is contained in:
Родитель
28bf4e3376
Коммит
b749fbbf15
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче