summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-05-09 10:11:22 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-05-09 12:36:33 +0200
commit247f4aefb9879dd465e34a2072218a0f1748de53 (patch)
treeb2746547efc05eb71fc8b9bf689ed4156e88eab0 /sd
parent0db2cd321fef8db7c17c6c588b6593c7d59a9688 (diff)
Resolves: tdf#148985 crash on searching for non-existing prefix
Change-Id: Ib89af12e75910adbd32abab5afceb9013dc51df2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134039 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index b3248aeaa15b..0910ba96efe4 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -2117,6 +2117,8 @@ IMPL_LINK_NOARG(CustomAnimationPane, SelectionHandler, Timer*, void)
}
int nSelected = mxLBAnimation->get_selected_index();
+ if (nSelected == -1)
+ return;
// tdf#99137, the selected entry may also be a subcategory title, so not an effect
// just skip it and move to the next one in this case