summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2023-03-23 15:35:49 +0000
committerCaolán McNamara <caolanm@redhat.com>2023-03-23 20:32:20 +0000
commitf70314c8d438efe6d26460cfbeb2e7fd955346cd (patch)
tree5894a3ac0b3986ab2925c3a5ba80c13d1e7d875b /vcl
parent07fa6e041f0d6146fc34ade4dcea1be8d69f80e2 (diff)
crashreporting: BitmapEx::operator=(BitmapEx const &) crashes
e.g. https://crashreport.libreoffice.org/stats/crash_details/b68d5267-16b1-4ee9-bd42-bdcecdb7043c this went wrong with: commit 91bc1e6a8c92a7c895f0ba9dcad9ac4d35f3f791 Date: Sat Jun 25 10:21:17 2022 +1000 vcl: extract function Animation::RenderNextFrameInAllRenderers() Change-Id: Iaccf12b251ffe06e24813c48ba3a169d0eaaa61c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/76416 which substituted mnAnimCount with nAnimCount which is a subtle one char difference, but mnAnimCount is a different thing entirely than the (then local variable) nAnimCount. mnAnimCount is the count of animations active, not the number of animation frames in a specific animation. orig code was const size_t nAnimCount = maFrames.size(); so replace mnAnimCount here with maFrames.size() to get back to the original logic Change-Id: I11d1797eb0b9ef61addb3769d12d8364872071df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149457 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/animate/Animation.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/animate/Animation.cxx b/vcl/source/animate/Animation.cxx
index 5d4a208a6b30..9c188e417951 100644
--- a/vcl/source/animate/Animation.cxx
+++ b/vcl/source/animate/Animation.cxx
@@ -328,7 +328,7 @@ void Animation::RenderNextFrameInAllRenderers()
{
Stop();
mbLoopTerminated = true;
- mnFrameIndex = mnAnimCount - 1;
+ mnFrameIndex = maFrames.size() - 1;
maBitmapEx = maFrames[mnFrameIndex]->maBitmapEx;
return;
}