[graphics/krita] libs/flake/text: Also handle potential crash when retrieving representation for a single family.

Wolthera van Hövell tot Westerflier <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 8451f9754ce311ab07610a51f13a0a7bf2db846c by Wolthera van Hövell tot Westerflier.
Committed on 17/08/2026 at 11:26.
Pushed by woltherav into branch 'master'.

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

CCBUG:523857

M  +1    -0    libs/flake/text/KoFFWWSConverter.cpp

https://invent.kde.org/graphics/krita/-/commit/8451f9754ce311ab07610a51f13a0a7bf2db846c

diff --git a/libs/flake/text/KoFFWWSConverter.cpp b/libs/flake/text/KoFFWWSConverter.cpp
index 817241db585..53f5b29f2e9 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);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.