diff options
| author | Jabiertxof <jabier.arraiza@marker.es> | 2019-09-10 22:34:40 +0000 |
|---|---|---|
| committer | Jabiertxof <jabier.arraiza@marker.es> | 2019-09-10 22:34:40 +0000 |
| commit | 4f0dd92b64c7b324c9eeb1cfddb2c827bbe74139 (patch) | |
| tree | ff74ac57e25ce5623d382321620babe5a9f0f212 /src | |
| parent | Menubar: Fix translation of submenu names (diff) | |
| download | inkscape-4f0dd92b64c7b324c9eeb1cfddb2c827bbe74139.tar.gz inkscape-4f0dd92b64c7b324c9eeb1cfddb2c827bbe74139.zip | |
Fix a crash undoing creation of a SVG 2 Flow
Diffstat (limited to 'src')
| -rw-r--r-- | src/ui/shape-editor-knotholders.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/ui/shape-editor-knotholders.cpp b/src/ui/shape-editor-knotholders.cpp index fe53a08ed..02add372f 100644 --- a/src/ui/shape-editor-knotholders.cpp +++ b/src/ui/shape-editor-knotholders.cpp @@ -1814,16 +1814,17 @@ TextKnotHolderEntityShapeInside::knot_get() const // SVG 2 'shape-inside'. We only get here if there is a rectangle shape. SPText *text = dynamic_cast<SPText *>(item); g_assert(text != nullptr); - g_assert(text->style->shape_inside.set); - + // we have a crash on undo cration so remove assert + // g_assert(text->style->shape_inside.set); Geom::Point p; - Geom::OptRect frame = text->get_frame(); - if (frame) { - p = (*frame).corner(2); - } else { - std::cerr << "TextKnotHolderEntityShapeInside::knot_get(): no frame!" << std::endl; + if (text->style->shape_inside.set) { + Geom::OptRect frame = text->get_frame(); + if (frame) { + p = (*frame).corner(2); + } else { + std::cerr << "TextKnotHolderEntityShapeInside::knot_get(): no frame!" << std::endl; + } } - return p; } |
