summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjulien2412 <serval2412@yahoo.fr>2012-01-09 18:03:11 +0100
committerThorsten Behrens <tbehrens@suse.com>2012-01-09 18:37:33 +0100
commit540963d879296ef81f883305057e63465b2ff586 (patch)
treed9ef667de7be2f0354c4ca7930be8cbf226c1bd4
parent22d05186ed7bf0314b43e1db09eb8706d09c6da1 (diff)
Fix crash when play particular presentation with sound
This fixes fdo#44533.
-rw-r--r--canvas/source/tools/spriteredrawmanager.cxx15
1 files changed, 8 insertions, 7 deletions
diff --git a/canvas/source/tools/spriteredrawmanager.cxx b/canvas/source/tools/spriteredrawmanager.cxx
index af2c27905b1c..25accbe47278 100644
--- a/canvas/source/tools/spriteredrawmanager.cxx
+++ b/canvas/source/tools/spriteredrawmanager.cxx
@@ -271,18 +271,18 @@ namespace canvas
++aCurrRecord;
}
- VectorOfSprites::iterator aBegin( aUpdatableSprites.begin() );
- VectorOfSprites::iterator aEnd ( aUpdatableSprites.end() );
- ::std::sort( aBegin,
- aEnd,
+ ::std::sort( aUpdatableSprites.begin(),
+ aUpdatableSprites.end(),
aSpriteComparator );
- aEnd = ::std::unique( aBegin, aEnd );
+ VectorOfSprites::iterator aEnd=
+ ::std::unique( aUpdatableSprites.begin(),
+ aUpdatableSprites.end() );
// for each unique sprite, check the change event vector,
// calculate the update operation from that, and add the
// result to the aUpdateArea.
- ::std::for_each( aBegin,
+ ::std::for_each( aUpdatableSprites.begin(),
aEnd,
SpriteUpdater( rUpdateAreas,
maChangeRecords) );
@@ -298,7 +298,8 @@ namespace canvas
VectorOfSprites aUnchangedSprites;
::std::set_difference( aSortedSpriteVector.begin(),
aSortedSpriteVector.end(),
- aBegin, aEnd,
+ aUpdatableSprites.begin(),
+ aEnd,
::std::back_insert_iterator< VectorOfSprites >(aUnchangedSprites) );
// add each remaining unchanged sprite to connected ranges,