sd/source/ui/animations/CustomAnimationPane.cxx |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 5f20ee5c9b50e1a4596da1eb27994556f32fe622
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Thu Jun 6 09:54:23 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Thu Jun 6 13:25:39 2024 +0200

    crashreporting: crash in CustomAnimationPane::UpdateAnimationLB
    
    speculative fix
    
    sd/source/ui/animations/CustomAnimationPane.cxx:2189
    vcl/source/control/ctrl.cxx:298
    sd/source/ui/animations/CustomAnimationPane.cxx:2189
    vcl/source/control/listbox.cxx:907
    vcl/source/window/paint.cxx:781
    vcl/source/control/ctrl.cxx:485
    vcl/source/control/listbox.cxx:906
    vcl/source/control/listbox.cxx:189
    vcl/source/control/imp_listbox.cxx:722
    vcl/source/control/imp_listbox.cxx:686
    vcl/source/control/imp_listbox.cxx:1133
    
    Change-Id: I707fcbcd8a86ef7cf736b5244d9e4a78fd7b4ef0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168492
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx 
b/sd/source/ui/animations/CustomAnimationPane.cxx
index 954e7ac2e74e..a6fa4bad98dd 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -2186,8 +2186,13 @@ IMPL_LINK_NOARG(CustomAnimationPane, SelectionHandler, 
Timer*, void)
 IMPL_LINK_NOARG(CustomAnimationPane, UpdateAnimationLB, weld::ComboBox&, void)
 {
     //FIXME: first effect only? what if there is more?
-    CustomAnimationEffectPtr pEffect = maListSelection.front();
-    fillAnimationLB( pEffect->hasText() );
+    bool bHasText = false;
+    if (!maListSelection.empty())
+    {
+        CustomAnimationEffectPtr pEffect = maListSelection.front();
+        bHasText = pEffect && pEffect->hasText();
+    }
+    fillAnimationLB(bHasText);
 }
 
 IMPL_LINK_NOARG(CustomAnimationPane, DurationModifiedHdl, 
weld::MetricSpinButton&, void)

Reply via email to