svtools/source/control/ctrlbox.cxx | 2 ++ 1 file changed, 2 insertions(+)
New commits: commit d48dd6057ecc50dbb31d24adce76aaf27d16db16 Author: Jan-Marek Glogowski <glo...@fbihome.de> AuthorDate: Mon Jun 20 14:39:55 2022 +0200 Commit: Jan-Marek Glogowski <glo...@fbihome.de> CommitDate: Tue Jun 21 17:00:40 2022 +0200 Correctly free font previews on settings change Change-Id: I9fdce7c9fb8a18571d3d6a317b28a344f18efa82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136227 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glo...@fbihome.de> diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index 411a2dd4961d..ecce7fa8af21 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -355,6 +355,8 @@ IMPL_LINK(FontNameBox, SettingsChangedHdl, VclSimpleEvent&, rEvent, void) DataChangedEvent* pData = static_cast<DataChangedEvent*>(static_cast<VclWindowEvent&>(rEvent).GetData()); if (pData->GetType() == DataChangedEventType::SETTINGS) { + for (auto &rDev : gFontPreviewVirDevs) + rDev.disposeAndClear(); gFontPreviewVirDevs.clear(); gRenderedFontNames.clear(); calcCustomItemSize(*m_xComboBox);