summaryrefslogtreecommitdiffstats
path: root/src/display/nr-svgfonts.cpp
diff options
context:
space:
mode:
authorFelipe Corr??a da Silva Sanches <juca@members.fsf.org>2008-05-29 03:57:52 +0000
committerJucaBlues <JucaBlues@users.sourceforge.net>2008-05-29 03:57:52 +0000
commit80769a368b75a7126440c3a5c2a4d858268d8beb (patch)
treeb69f0540d588839000480621ff0241b2d3d9faab /src/display/nr-svgfonts.cpp
parentCmake: Improve Gtkmm dependency checking, add new files to CMakeLists.txts, r... (diff)
downloadinkscape-80769a368b75a7126440c3a5c2a4d858268d8beb.tar.gz
inkscape-80769a368b75a7126440c3a5c2a4d858268d8beb.zip
fix some crashes. Now I check for the existence of the d atrtibute
before trying to use it (bzr r5761)
Diffstat (limited to 'src/display/nr-svgfonts.cpp')
-rw-r--r--src/display/nr-svgfonts.cpp6
1 files changed, 4 insertions, 2 deletions
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);