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

Also handle potential crash when retrieving representation for a single family.

Wolthera van Hövell tot Westerflier8451f9754ce3
diff --git a/libs/flake/text/KoFFWWSConverter.cpp b/libs/flake/text/KoFFWWSConverter.cpp
index 817241db58..53f5b29f2e 100644
--- a/libs/flake/text/KoFFWWSConverter.cpp
+++ b/libs/flake/text/KoFFWWSConverter.cpp
@@ -1078,6 +1078,7 @@ std::optional<KoFontFamilyWWSRepresentation> KoFFWWSConverter::representationByF
{
for (auto typographic = d->fontFamilyCollection.childBegin(); typographic != d->fontFamilyCollection.childEnd(); typographic++) {
auto counter = childBegin(typographic);
+ if (counter == childEnd(typographic)) continue;
counter++;
bool singleFamily = counter == childEnd(typographic);