summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-07-15 15:28:09 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2021-07-15 18:01:43 +0200
commit5570795d54a00041a406243b777f0df5f6399b67 (patch)
tree462d6fc4e7d491a42547b992e85b9f9e51c6d1b3 /svtools
parentd756a599298abb23657469cfd94c4a201824c419 (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/+/118922 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'svtools')
-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 655eb430db60..e5778d949bee 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();
+ }
}
}