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

New commits:
commit 3ca2a54eb25bb934f4e5fd5f7ad9097d582ab140
Author:     Caolán McNamara <[email protected]>
AuthorDate: Thu Jun 6 09:54:23 2024 +0100
Commit:     Xisco Fauli <[email protected]>
CommitDate: Thu Jun 6 15:29:12 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/+/168446
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <[email protected]>

diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx 
b/sd/source/ui/animations/CustomAnimationPane.cxx
index 7eb623138713..9f07b9744a2a 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -2189,8 +2189,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