diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2008-06-16 07:40:12 +0000 |
|---|---|---|
| committer | joncruz <joncruz@users.sourceforge.net> | 2008-06-16 07:40:12 +0000 |
| commit | a5675410b242edc30d4f43328346939ae5667917 (patch) | |
| tree | 034d9bba2a96ffeeae7b86bd65ad2f21aa7488da /src | |
| parent | UnicodeRange class implementation. (diff) | |
| download | inkscape-a5675410b242edc30d4f43328346939ae5667917.tar.gz inkscape-a5675410b242edc30d4f43328346939ae5667917.zip | |
Fixed NPE
(bzr r5950)
Diffstat (limited to 'src')
| -rw-r--r-- | src/display/nr-arena-shape.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/display/nr-arena-shape.cpp b/src/display/nr-arena-shape.cpp index 6bcb9e5b8..4b7ceed27 100644 --- a/src/display/nr-arena-shape.cpp +++ b/src/display/nr-arena-shape.cpp @@ -674,14 +674,16 @@ nr_arena_shape_add_bboxes(NRArenaShape* shape, Geom::Rect &bbox) Geom::Interval(shape->stroke_shp->topY, shape->stroke_shp->bottomY) ); bbox.unionWith(stroke_bbox); } + if ( shape->fill_shp ) { shape->fill_shp->CalcBBox(); shape->fill_shp->leftX=floor(shape->fill_shp->leftX); shape->fill_shp->rightX=ceil(shape->fill_shp->rightX); shape->fill_shp->topY=floor(shape->fill_shp->topY); shape->fill_shp->bottomY=ceil(shape->fill_shp->bottomY); - Geom::Rect fill_bbox( Geom::Interval(shape->stroke_shp->leftX, shape->stroke_shp->rightX), - Geom::Interval(shape->stroke_shp->topY, shape->stroke_shp->bottomY) ); + Shape *larger = shape->stroke_shp ? shape->stroke_shp : shape->fill_shp; + Geom::Rect fill_bbox( Geom::Interval(larger->leftX, larger->rightX), + Geom::Interval(larger->topY, larger->bottomY) ); bbox.unionWith(fill_bbox); } } |
