diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2010-10-23 17:19:19 +0000 |
|---|---|---|
| committer | Johan Engelen <goejendaagh@zonnet.nl> | 2010-10-23 17:19:19 +0000 |
| commit | cae59e333f03279c14ca77b30a06c32273b70360 (patch) | |
| tree | ba3960a3f0f797680ecf66015f2962b6f00b0b8e /src/extension/internal/cairo-render-context.cpp | |
| parent | PDF export. Fix for Bug #664335 (pdf export with cairo 1.10 defaults to versi... (diff) | |
| download | inkscape-cae59e333f03279c14ca77b30a06c32273b70360.tar.gz inkscape-cae59e333f03279c14ca77b30a06c32273b70360.zip | |
fix crash bug: PDF export: crash in 'CairoRenderContext::_showGlyphs'
Fixed bugs:
- https://launchpad.net/bugs/564442
(bzr r9842)
Diffstat (limited to 'src/extension/internal/cairo-render-context.cpp')
| -rw-r--r-- | src/extension/internal/cairo-render-context.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/extension/internal/cairo-render-context.cpp b/src/extension/internal/cairo-render-context.cpp index 098c56a79..2e5ab295e 100644 --- a/src/extension/internal/cairo-render-context.cpp +++ b/src/extension/internal/cairo-render-context.cpp @@ -1480,18 +1480,19 @@ CairoRenderContext::_showGlyphs(cairo_t *cr, PangoFont *font, std::vector<CairoG glyphs = (cairo_glyph_t*)g_malloc(sizeof(cairo_glyph_t) * num_glyphs); unsigned int num_invalid_glyphs = 0; - unsigned int i = 0; + unsigned int i = 0; // is a counter for indexing the glyphs array, only counts the valid glyphs for (std::vector<CairoGlyphInfo>::const_iterator it_info = glyphtext.begin() ; it_info != glyphtext.end() ; it_info++) { // skip glyphs which are PANGO_GLYPH_EMPTY (0x0FFFFFFF) // or have the PANGO_GLYPH_UNKNOWN_FLAG (0x10000000) set if (it_info->index == 0x0FFFFFFF || it_info->index & 0x10000000) { TRACE(("INVALID GLYPH found\n")); + g_message("Invalid glyph found, continuing..."); num_invalid_glyphs++; continue; } - glyphs[i - num_invalid_glyphs].index = it_info->index; - glyphs[i - num_invalid_glyphs].x = it_info->x; - glyphs[i - num_invalid_glyphs].y = it_info->y; + glyphs[i].index = it_info->index; + glyphs[i].x = it_info->x; + glyphs[i].y = it_info->y; i++; } |
