diff options
author | Muhammet Kara <muhammet.kara@collabora.com> | 2019-11-09 00:14:11 +0300 |
---|---|---|
committer | Muhammet Kara <muhammet.kara@collabora.com> | 2019-11-08 23:31:16 +0100 |
commit | 8023a613e978be42758c88d23f1973f7b9661676 (patch) | |
tree | 30c728ecd33f04de7fd8901e12ecd0ef2a0667a8 /sd | |
parent | 1b66d0141c68e2fd1100a34274d7e0d292cf26d9 (diff) |
Fix tdf#124708: CRASH: Selecting all and deleting
Change-Id: I0de912dad97f266a56ab52a351b0676f17675ed5
Reviewed-on: https://gerrit.libreoffice.org/82332
Tested-by: Jenkins
Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/core/CustomAnimationCloner.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sd/source/core/CustomAnimationCloner.cxx b/sd/source/core/CustomAnimationCloner.cxx index 4fabb5117ae1..3049abb60d5c 100644 --- a/sd/source/core/CustomAnimationCloner.cxx +++ b/sd/source/core/CustomAnimationCloner.cxx @@ -282,9 +282,13 @@ namespace sd Reference< XAnimationNode > CustomAnimationClonerImpl::getClonedNode( const Reference< XAnimationNode >& xSource ) const { - sal_Int32 nNode, nNodeCount = maSourceNodeVector.size(); + std::size_t nNodeCount = maSourceNodeVector.size(); + std::size_t nCloneNodeCount = maCloneNodeVector.size(); - for( nNode = 0; nNode < nNodeCount; nNode++ ) + if (nNodeCount != nCloneNodeCount) + SAL_WARN("sd.core", "Sizes of maSourceNodeVector and maCloneNodeVector mismatch!"); + + for( std::size_t nNode = 0; nNode < nNodeCount && nNode < nCloneNodeCount; ++nNode ) { if( maSourceNodeVector[nNode] == xSource ) return maCloneNodeVector[nNode]; |