зеркало из https://github.com/mozilla/pjs.git
Bugzilla Bug 80634 Program received signal SIGSEGV, Segmentation fault.
Bullet-proofing patch + ASSERT. rs=shaver
This commit is contained in:
Родитель
f9cac06472
Коммит
1b51c1fede
|
@ -1253,7 +1253,9 @@ nsGfxScrollFrameInner::Layout(nsBoxLayoutState& aState)
|
||||||
nsCOMPtr<nsIFontMetrics> fm;
|
nsCOMPtr<nsIFontMetrics> fm;
|
||||||
presContext->GetMetricsFor(f, getter_AddRefs(fm));
|
presContext->GetMetricsFor(f, getter_AddRefs(fm));
|
||||||
nscoord fontHeight = 1;
|
nscoord fontHeight = 1;
|
||||||
fm->GetHeight(fontHeight);
|
NS_ASSERTION(fm,"FontMetrics is null assuming fontHeight == 1");
|
||||||
|
if (fm)
|
||||||
|
fm->GetHeight(fontHeight);
|
||||||
|
|
||||||
nscoord maxX = scrolledContentSize.width - scrollAreaRect.width;
|
nscoord maxX = scrolledContentSize.width - scrollAreaRect.width;
|
||||||
nscoord maxY = scrolledContentSize.height - scrollAreaRect.height;
|
nscoord maxY = scrolledContentSize.height - scrollAreaRect.height;
|
||||||
|
|
|
@ -1253,7 +1253,9 @@ nsGfxScrollFrameInner::Layout(nsBoxLayoutState& aState)
|
||||||
nsCOMPtr<nsIFontMetrics> fm;
|
nsCOMPtr<nsIFontMetrics> fm;
|
||||||
presContext->GetMetricsFor(f, getter_AddRefs(fm));
|
presContext->GetMetricsFor(f, getter_AddRefs(fm));
|
||||||
nscoord fontHeight = 1;
|
nscoord fontHeight = 1;
|
||||||
fm->GetHeight(fontHeight);
|
NS_ASSERTION(fm,"FontMetrics is null assuming fontHeight == 1");
|
||||||
|
if (fm)
|
||||||
|
fm->GetHeight(fontHeight);
|
||||||
|
|
||||||
nscoord maxX = scrolledContentSize.width - scrollAreaRect.width;
|
nscoord maxX = scrolledContentSize.width - scrollAreaRect.width;
|
||||||
nscoord maxY = scrolledContentSize.height - scrollAreaRect.height;
|
nscoord maxY = scrolledContentSize.height - scrollAreaRect.height;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче