Commit 5a298aa2 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Check KoShapeController pointer before dereferencing

Since KoShapeController *KoDocumentResourceManager::shapeController()
can return 0, we need to check the pointer.

BUG:406648
parent 3bdfef28
......@@ -609,12 +609,13 @@ KoShape *KoSvgTextShapeFactory::createShape(const KoProperties *params, KoDocume
shapeRect = rect.toRectF();
}
KoShapeController *controller = documentResources->shapeController();
KoSvgTextShapeMarkupConverter converter(shape);
converter.convertFromSvg(svgText,
defs,
shapeRect,
documentResources->shapeController()->pixelsPerInch());
controller ? controller->pixelsPerInch() : 72);
shape->setPosition(shapeRect.topLeft());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment