summaryrefslogtreecommitdiffstats
path: root/src/sp-text.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2011-09-04 21:17:50 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2011-09-04 21:17:50 +0000
commit8e867961dfc221568661c695aeddc10552f0accb (patch)
tree182b990bfc2075f58a5d0ee8340e63824cb1d863 /src/sp-text.cpp
parentExtensions. Pattern along Path. Warn if width of pattern is zero (Bug 486920) (diff)
downloadinkscape-8e867961dfc221568661c695aeddc10552f0accb.tar.gz
inkscape-8e867961dfc221568661c695aeddc10552f0accb.zip
Fix crashes with empty text objects
(bzr r10617)
Diffstat (limited to 'src/sp-text.cpp')
-rw-r--r--src/sp-text.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sp-text.cpp b/src/sp-text.cpp
index fc248824d..a9c1b2a4b 100644
--- a/src/sp-text.cpp
+++ b/src/sp-text.cpp
@@ -367,7 +367,7 @@ sp_text_bbox(SPItem const *item, Geom::Affine const &transform, SPItem::BBoxType
Geom::OptRect bbox = SP_TEXT(item)->layout.bounds(transform);
// FIXME this code is incorrect
- if (type == SPItem::VISUAL_BBOX && !item->style->stroke.isNone()) {
+ if (bbox && type == SPItem::VISUAL_BBOX && !item->style->stroke.isNone()) {
double scale = transform.descrim();
bbox->expandBy(0.5 * item->style->stroke_width.computed * scale);
}