summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-02-20 14:52:52 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-02-28 16:53:05 +0000
commit1d1582dedfd41cbc28c6b5383deace28a77a6114 (patch)
treedfcb127c3759a470f0e1f32bb54c38032bea9b83
parent5351055562f37a35f1f09fec0e32e0a8ab8eb3ce (diff)
Resolves: tdf#106105 duplicate marks not merged when they are at the start
i.e. initial mark isn't compared which goes on to crash under some circumstances regression from... commit aa11e7bae89fe691f914abb27d1c4a03d27a7ee5 Date: Tue Aug 14 16:31:53 2012 +0200 Convert maList in SdrMarkList from Container to std::vector Change-Id: Ib3e9b02aad91c14971656af171d48154507da127 (cherry picked from commit 35bb22c1a834b306c910cb065bc006818c9fa9b3) Reviewed-on: https://gerrit.libreoffice.org/34478 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--svx/source/svdraw/svdmark.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/svx/source/svdraw/svdmark.cxx b/svx/source/svdraw/svdmark.cxx
index 66e5f6eb71b0..6cf64c9e1da6 100644
--- a/svx/source/svdraw/svdmark.cxx
+++ b/svx/source/svdraw/svdmark.cxx
@@ -179,8 +179,9 @@ void SdrMarkList::ImpForceSort()
if(maList.size() > 1)
{
SdrMark* pAkt = maList.back();
- for (size_t i = maList.size() - 2; i; --i)
+ for (size_t count = maList.size() - 1; count; --count)
{
+ size_t i = count - 1;
SdrMark* pCmp = maList[i];
if(pAkt->GetMarkedSdrObj() == pCmp->GetMarkedSdrObj() && pAkt->GetMarkedSdrObj())
{