diff options
| author | Josh Andler <scislac@gmail.com> | 2009-10-07 01:42:19 +0000 |
|---|---|---|
| committer | scislac <scislac@users.sourceforge.net> | 2009-10-07 01:42:19 +0000 |
| commit | b891975a296e89d5b072ec4d66978122b584dc55 (patch) | |
| tree | f30312eff72999ebcf32cfc30af390a5f02885c6 /src | |
| parent | Japanese translation by Masato HASHIMOTO (diff) | |
| download | inkscape-b891975a296e89d5b072ec4d66978122b584dc55.tar.gz inkscape-b891975a296e89d5b072ec4d66978122b584dc55.zip | |
Patch by Diederik to mitigate crash on 318726.
(bzr r8735)
Diffstat (limited to 'src')
| -rw-r--r-- | src/seltrans.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/seltrans.cpp b/src/seltrans.cpp index 708ee4b09..8ff00d60a 100644 --- a/src/seltrans.cpp +++ b/src/seltrans.cpp @@ -1630,10 +1630,17 @@ Geom::Point Inkscape::SelTrans::_calcAbsAffineGeom(Geom::Scale const geom_scale) Inkscape::Preferences *prefs = Inkscape::Preferences::get(); bool const transform_stroke = prefs->getBool("/options/transform/stroke", true); - Geom::Rect visual_bbox = get_visual_bbox(_geometric_bbox, _absolute_affine, _strokewidth, transform_stroke); + if (_geometric_bbox) { + Geom::Rect visual_bbox = get_visual_bbox(_geometric_bbox, _absolute_affine, _strokewidth, transform_stroke); + // return the new handle position + return visual_bbox.min() + visual_bbox.dimensions() * Geom::Scale(_handle_x, _handle_y); + } - // return the new handle position - return visual_bbox.min() + visual_bbox.dimensions() * Geom::Scale(_handle_x, _handle_y); + // Fall back scenario, in case we don't have a geometric bounding box at hand; + // (Due to some bugs related to bounding boxes having at least one zero dimension; For more details + // see https://bugs.launchpad.net/inkscape/+bug/318726) + g_warning("No geometric bounding box has been calculated; this is a bug that needs fixing!"); + return _calcAbsAffineDefault(geom_scale); // this is bogus, but we must return _something_ } void Inkscape::SelTrans::_keepClosestPointOnly(std::vector<std::pair<Geom::Point, int> > &points, const Geom::Point &reference) |
