summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEduard Braun <eduard.braun2@gmx.de>2016-03-30 00:06:26 +0000
committerEduard Braun <eduard.braun2@gmx.de>2016-03-30 00:06:26 +0000
commitb7fbe1182eabcd13d53e1dbcbfcbec93e37f01ee (patch)
tree0dd9705085e71234f8f21ce891522c7563949e0a /src
parentbuildtool: Comment a verbose debug message (that usually hides actual compile... (diff)
downloadinkscape-b7fbe1182eabcd13d53e1dbcbfcbec93e37f01ee.tar.gz
inkscape-b7fbe1182eabcd13d53e1dbcbfcbec93e37f01ee.zip
Fix bug #1548953 (Crash when SVG contains certain special chars)
Fixed bugs: - https://launchpad.net/bugs/1548953 (bzr r14750)
Diffstat (limited to 'src')
-rw-r--r--src/display/drawing-text.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/display/drawing-text.cpp b/src/display/drawing-text.cpp
index a3ca7173a..f0d83abfd 100644
--- a/src/display/drawing-text.cpp
+++ b/src/display/drawing-text.cpp
@@ -100,14 +100,16 @@ unsigned DrawingGlyphs::_updateItem(Geom::IntRect const &/*area*/, UpdateContext
above and below the max/min y positions of the letters to place the text decorations.*/
Geom::Rect b;
- if(_drawable){
- Geom::OptRect tiltb = bounds_exact(*_font->PathVector(_glyph));
- Geom::Rect bigbox(Geom::Point(tiltb->left(),-_dsc*scale_bigbox*1.1),Geom::Point(tiltb->right(),_asc*scale_bigbox*1.1));
- b = bigbox * ctx.ctm;
+ if (_drawable) {
+ Geom::OptRect tiltb = bounds_exact(*_font->PathVector(_glyph));
+ if (tiltb) {
+ Geom::Rect bigbox(Geom::Point(tiltb->left(),-_dsc*scale_bigbox*1.1),Geom::Point(tiltb->right(),_asc*scale_bigbox*1.1));
+ b = bigbox * ctx.ctm;
+ }
}
- else { // Fallback, spaces mostly
- Geom::Rect bigbox(Geom::Point(0.0, -_dsc*scale_bigbox*1.1),Geom::Point(_width*scale_bigbox, _asc*scale_bigbox*1.1));
- b = bigbox * ctx.ctm;
+ if (b.hasZeroArea()) { // Fallback, spaces mostly
+ Geom::Rect bigbox(Geom::Point(0.0, -_dsc*scale_bigbox*1.1),Geom::Point(_width*scale_bigbox, _asc*scale_bigbox*1.1));
+ b = bigbox * ctx.ctm;
}
/*