[vlmc-devel] SequenceWorkflow: Fix erasing the same iterator twice
Yikai Lu
git at videolan.org
Mon Aug 22 22:01:02 CEST 2016
vlmc | branch: medialibrary | Yikai Lu <luyikei.qmltu at gmail.com> | Sun Aug 21 18:22:48 2016 -0500| [153d8cd897baef95d534d69068fa9079ec30d68f] | committer: Hugo Beauzée-Luyssen
SequenceWorkflow: Fix erasing the same iterator twice
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> https://code.videolan.org/videolan/vlmc/commit/153d8cd897baef95d534d69068fa9079ec30d68f
---
src/Workflow/SequenceWorkflow.cpp | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/Workflow/SequenceWorkflow.cpp b/src/Workflow/SequenceWorkflow.cpp
index 1b03623..d932bd2 100644
--- a/src/Workflow/SequenceWorkflow.cpp
+++ b/src/Workflow/SequenceWorkflow.cpp
@@ -120,9 +120,12 @@ SequenceWorkflow::moveClip( const QUuid& uuid, quint32 trackId, qint64 pos )
else
{
ret = track->move( std::get<ClipTupleIndex::Position>( it.value() ), pos );
+ if ( ret == true )
+ {
+ m_clips.erase( it );
+ m_clips.insert( uuid, std::make_tuple( clip, trackId, pos ) );
+ }
}
- m_clips.erase( it );
- m_clips.insert( uuid, std::make_tuple( clip, trackId, pos ) );
// TODO: If we detect collision too strictly, there will be a problem if we want to move multiple
// clips at the same time.
return ret;
More information about the Vlmc-devel
mailing list