From 216b26fb6bb3fbc3c8bcfcd15980d2d3cb2bb887 Mon Sep 17 00:00:00 2001 From: "tor%cs.brown.edu" Date: Wed, 19 Jan 2005 22:05:47 +0000 Subject: [PATCH] null check --- layout/svg/renderer/src/cairo/nsSVGCairoGlyphGeometry.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/layout/svg/renderer/src/cairo/nsSVGCairoGlyphGeometry.cpp b/layout/svg/renderer/src/cairo/nsSVGCairoGlyphGeometry.cpp index 0ec48d4b61c..484d71dd957 100644 --- a/layout/svg/renderer/src/cairo/nsSVGCairoGlyphGeometry.cpp +++ b/layout/svg/renderer/src/cairo/nsSVGCairoGlyphGeometry.cpp @@ -380,6 +380,10 @@ nsSVGCairoGlyphGeometry::GetCoveredRegion(nsISVGRendererRegion **_retval) } cairo_font_t *font = metrics->GetFont(); + + if (!font) + return NS_OK; + cairo_set_font(ctx, font); GetGlobalTransform(ctx);