Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
Prevent crash when saving ImageShape
Wolthera van Hövell tot Westerflierfbc1d8797e3f
diff --git a/plugins/flake/imageshape/ImageShape.cpp b/plugins/flake/imageshape/ImageShape.cppindex 8798b83fd5..46f02f6546 100644--- a/plugins/flake/imageshape/ImageShape.cpp+++ b/plugins/flake/imageshape/ImageShape.cpp@@ -86,7 +86,7 @@ bool ImageShape::saveSvg(SvgSavingContext &context)context.shapeWriter().addAttribute("width", QString("%1px").arg(KisDomUtils::toString(size().width())));context.shapeWriter().addAttribute("height", QString("%1px").arg(KisDomUtils::toString(size().height())));- QString aspectString = m_d->ratioParser->toString();+ QString aspectString = m_d->ratioParser? m_d->ratioParser->toString(): QString();if (!aspectString.isEmpty()) {context.shapeWriter().addAttribute("preserveAspectRatio", aspectString);}