Skip to content

armgit / krita

Public Imported from GitHub
0

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++

Try to fix crash in KoFFWWSConverter

Wolthera van Hövell tot Westerflier68dd1ae15a9c
diff --git a/libs/flake/text/KoFFWWSConverter.cpp b/libs/flake/text/KoFFWWSConverter.cpp
index 6fc6f77591..817241db58 100644
--- a/libs/flake/text/KoFFWWSConverter.cpp
+++ b/libs/flake/text/KoFFWWSConverter.cpp
@@ -1017,6 +1017,7 @@ QList<KoFontFamilyWWSRepresentation> KoFFWWSConverter::collectFamilies() const
QList<KoFontFamilyWWSRepresentation> collection;
for (auto typographic = d->fontFamilyCollection.childBegin(); typographic != d->fontFamilyCollection.childEnd(); typographic++) {
auto counter = childBegin(typographic);
+ if (counter == childEnd(typographic)) continue;
counter++;
bool singleFamily = childBegin(typographic) != childEnd(typographic) && std::next(childBegin(typographic)) == childEnd(typographic);