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++
Fix crash in glyphmodel code.
Wolthera van Hövell tot Westerflier76d88d5e99d3
diff --git a/libs/flake/text/KoFontGlyphModel.cpp b/libs/flake/text/KoFontGlyphModel.cppindex fba72c741a..3c078c3dd0 100644--- a/libs/flake/text/KoFontGlyphModel.cpp+++ b/libs/flake/text/KoFontGlyphModel.cpp@@ -446,9 +446,8 @@ QModelIndex KoFontGlyphModel::parent(const QModelIndex &child) constreturn QModelIndex();}Private::InfoNode *node = static_cast<Private::InfoNode*>(child.internalPointer());- Private::GlyphInfo *glyphInfo = dynamic_cast<Private::GlyphInfo*>(node);- if (glyphInfo) {- const uint targetUcs = glyphInfo->ucs;+ if (node) {+ const uint targetUcs = node->ucs;for(int i = 0; i < d->codePoints.size(); i++) {Private::CodePointInfo info = d->codePoints.at(i);if (info.ucs == targetUcs) {