Bug 292222 - crash on some svg with no gdi+. r=afri, a=asa

This commit is contained in:
tor%cs.brown.edu 2005-05-05 19:55:32 +00:00
Родитель 3b6a4e695f
Коммит 6940bbb1dd
1 изменённых файлов: 7 добавлений и 8 удалений

Просмотреть файл

@ -284,16 +284,15 @@ nsSVGGlyphFrame::Init(nsPresContext* aPresContext,
}
nsCOMPtr<nsISVGRenderer> renderer;
outerSVGFrame->GetRenderer(getter_AddRefs(renderer));
if (!renderer) return NS_ERROR_FAILURE;
renderer->CreateGlyphMetrics(this, getter_AddRefs(mMetrics));
if (!mMetrics) return NS_ERROR_FAILURE;
renderer->CreateGlyphGeometry(this, getter_AddRefs(mGeometry));
if (!mGeometry) return NS_ERROR_FAILURE;
if (renderer) {
renderer->CreateGlyphMetrics(this, getter_AddRefs(mMetrics));
renderer->CreateGlyphGeometry(this, getter_AddRefs(mGeometry));
}
SetStyleContext(aPresContext, aContext);
if (!renderer || !mMetrics || !mGeometry)
return NS_ERROR_FAILURE;
return NS_OK;
}