Bugzilla Bug 80634 Program received signal SIGSEGV, Segmentation fault.

Bullet-proofing patch + ASSERT. rs=shaver
This commit is contained in:
timeless%mac.com 2001-05-15 03:12:08 +00:00
parent 5fa6f1b3c4
commit 1466f58289
2 changed files with 6 additions and 2 deletions

View File

@ -1253,7 +1253,9 @@ nsGfxScrollFrameInner::Layout(nsBoxLayoutState& aState)
nsCOMPtr<nsIFontMetrics> fm;
presContext->GetMetricsFor(f, getter_AddRefs(fm));
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 maxY = scrolledContentSize.height - scrollAreaRect.height;

View File

@ -1253,7 +1253,9 @@ nsGfxScrollFrameInner::Layout(nsBoxLayoutState& aState)
nsCOMPtr<nsIFontMetrics> fm;
presContext->GetMetricsFor(f, getter_AddRefs(fm));
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 maxY = scrolledContentSize.height - scrollAreaRect.height;