From: JucaBlues Date: Thu, 29 May 2008 03:57:52 +0000 (+0000) Subject: fix some crashes. Now I check for the existence of the d atrtibute X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=fdab393307601fbda47db903f77e4db1f8e941d3;p=inkscape.git fix some crashes. Now I check for the existence of the d atrtibute before trying to use it --- diff --git a/src/display/nr-svgfonts.cpp b/src/display/nr-svgfonts.cpp index 9b760c0bc..ccce7edc5 100644 --- a/src/display/nr-svgfonts.cpp +++ b/src/display/nr-svgfonts.cpp @@ -155,8 +155,10 @@ SvgFont::scaled_font_render_glyph (cairo_scaled_font_t *scaled_font, } NArtBpath *bpath = NULL; - if (SP_IS_GLYPH(node)) bpath = sp_svg_read_path(((SPGlyph*)node)->d); - if (SP_IS_MISSING_GLYPH(node)) bpath = sp_svg_read_path(((SPMissingGlyph*)node)->d); + if (SP_IS_GLYPH(node) && ((SPGlyph*)node)->d) bpath = sp_svg_read_path(((SPGlyph*)node)->d); + if (SP_IS_MISSING_GLYPH(node) && ((SPMissingGlyph*)node)->d) bpath = sp_svg_read_path(((SPMissingGlyph*)node)->d); + + if (!bpath) return CAIRO_STATUS_SUCCESS; cairo_new_path(cr);