[graphics/krita/krita/6.0] libs/flake/text: Try to fix crash in KoFFWWSConverter

Wolthera van Hövell <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit fbf1808d139d831893c0b47ef4a5c5983992b789 by Wolthera van Hövell.
Committed on 05/08/2026 at 13:05.
Pushed by woltherav into branch 'krita/6.0'.

Try to fix crash in KoFFWWSConverter

BUG:523857


(cherry picked from commit 68dd1ae15a9cbd4bbe7825e6c03e04b3380a05e5)

Co-authored-by: Wolthera van Hövell tot Westerflier <[email protected]>

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

https://invent.kde.org/graphics/krita/-/commit/fbf1808d139d831893c0b47ef4a5c5983992b789

diff --git a/libs/flake/text/KoFFWWSConverter.cpp b/libs/flake/text/KoFFWWSConverter.cpp
index 6fc6f775910..817241db585 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);
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.