diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-07-15 15:28:09 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-07-15 18:01:31 +0200 |
commit | 096e288731519a30006dc6d865db72ffb6cac6d6 (patch) | |
tree | f987e2234ab314a90f0229a6ed647016a76577fb | |
parent | bfc49fc16c1cc9b9a5dee406fe7348c079c45ba6 (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/+/118923
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r-- | svtools/source/control/ctrlbox.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index 4a0210cde5bd..7c7f61cb61f8 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -360,8 +360,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(); + } } } |