summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-07-15 15:28:09 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-07-15 17:35:36 +0200
commita449b624b24515764a2a494e831583218ee54097 (patch)
treea83574cb45801a96dec86337dcb1ea41c1ee16f6
parentb8b27b7c4baaf7554a28383e0f66eabc6dd03dca (diff)
crashreporting: Crash seen in CachePreview from Idle UpdateHdl
the intent here is regenerate the previews if font settings changed which should mean that we restart at index 0 and not continue from the old index https: //crashreport.libreoffice.org/stats/crash_details/a01c5fcd-983b-40ab-b90a-8ee90286e5b8 Change-Id: I9604ad96cf6cc757d2d33469827d1295d309454d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118987 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--svtools/source/control/ctrlbox.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 33364f5a32fb..b20b3cfdf703 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -357,8 +357,11 @@ IMPL_LINK(FontNameBox, SettingsChangedHdl, VclSimpleEvent&, rEvent, void)
gFontPreviewVirDevs.clear();
gRenderedFontNames.clear();
calcCustomItemSize(*m_xComboBox);
- if (mbWYSIWYG)
+ if (mbWYSIWYG && mpFontList && !mpFontList->empty())
+ {
+ mnPreviewProgress = 0;
maUpdateIdle.Start();
+ }
}
}