diff options
author | julien2412 <serval2412@yahoo.fr> | 2012-01-09 18:03:11 +0100 |
---|---|---|
committer | Thorsten Behrens <tbehrens@suse.com> | 2012-01-09 18:37:33 +0100 |
commit | 540963d879296ef81f883305057e63465b2ff586 (patch) | |
tree | d9ef667de7be2f0354c4ca7930be8cbf226c1bd4 /canvas | |
parent | callcatcher: remove unused SalColormap methods (diff) | |
download | core-540963d879296ef81f883305057e63465b2ff586.tar.gz core-540963d879296ef81f883305057e63465b2ff586.zip |
Fix crash when play particular presentation with sound
This fixes fdo#44533.
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/source/tools/spriteredrawmanager.cxx | 15 |
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, |