Kaydet (Commit) 540963d8 authored tarafından julien2412's avatar julien2412 Kaydeden (comit) Thorsten Behrens

Fix crash when play particular presentation with sound

This fixes fdo#44533.
üst 22d05186
...@@ -271,18 +271,18 @@ namespace canvas ...@@ -271,18 +271,18 @@ namespace canvas
++aCurrRecord; ++aCurrRecord;
} }
VectorOfSprites::iterator aBegin( aUpdatableSprites.begin() ); ::std::sort( aUpdatableSprites.begin(),
VectorOfSprites::iterator aEnd ( aUpdatableSprites.end() ); aUpdatableSprites.end(),
::std::sort( aBegin,
aEnd,
aSpriteComparator ); aSpriteComparator );
aEnd = ::std::unique( aBegin, aEnd ); VectorOfSprites::iterator aEnd=
::std::unique( aUpdatableSprites.begin(),
aUpdatableSprites.end() );
// for each unique sprite, check the change event vector, // for each unique sprite, check the change event vector,
// calculate the update operation from that, and add the // calculate the update operation from that, and add the
// result to the aUpdateArea. // result to the aUpdateArea.
::std::for_each( aBegin, ::std::for_each( aUpdatableSprites.begin(),
aEnd, aEnd,
SpriteUpdater( rUpdateAreas, SpriteUpdater( rUpdateAreas,
maChangeRecords) ); maChangeRecords) );
...@@ -298,7 +298,8 @@ namespace canvas ...@@ -298,7 +298,8 @@ namespace canvas
VectorOfSprites aUnchangedSprites; VectorOfSprites aUnchangedSprites;
::std::set_difference( aSortedSpriteVector.begin(), ::std::set_difference( aSortedSpriteVector.begin(),
aSortedSpriteVector.end(), aSortedSpriteVector.end(),
aBegin, aEnd, aUpdatableSprites.begin(),
aEnd,
::std::back_insert_iterator< VectorOfSprites >(aUnchangedSprites) ); ::std::back_insert_iterator< VectorOfSprites >(aUnchangedSprites) );
// add each remaining unchanged sprite to connected ranges, // add each remaining unchanged sprite to connected ranges,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment