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

Handle second KisForest::erase situation in KoFFWWSConverter.

Wolthera van Hövell tot Westerfliera3fea902e5ed
diff --git a/libs/flake/text/KoFFWWSConverter.cpp b/libs/flake/text/KoFFWWSConverter.cpp
index 34951e9360..d1ffc627ae 100644
--- a/libs/flake/text/KoFFWWSConverter.cpp
+++ b/libs/flake/text/KoFFWWSConverter.cpp
@@ -719,9 +719,14 @@ void KoFFWWSConverter::sortIntoWWSFamilies()
auto newWWS = d->fontFamilyCollection.insert(childEnd(typographic), wwsFamily);
d->fontFamilyCollection.insert(childEnd(newWWS), *font);
- tempList.erase(font);
+ deleteList.append(font);
}
}
+ while (!deleteList.isEmpty()) {
+ auto child = deleteList.takeFirst();
+ KIS_ASSERT_RECOVER_NOOP(childBegin(child) == childEnd(child));
+ tempList.erase(child);
+ }
// Then sort the rest of the family nodes into wws families.
for (auto font = tempList.childBegin(); font != tempList.childEnd(); font++) {
auto wws = childBegin(typographic);