Commit 0a7bab94 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Prevent potential crash when removing a clip

parent 8e32e0bc
...@@ -243,8 +243,11 @@ MainWorkflow::removeClip( const QUuid &uuid, unsigned int trackId, ...@@ -243,8 +243,11 @@ MainWorkflow::removeClip( const QUuid &uuid, unsigned int trackId,
MainWorkflow::TrackType trackType ) MainWorkflow::TrackType trackType )
{ {
Clip *clip = m_tracks[trackType]->removeClip( uuid, trackId ); Clip *clip = m_tracks[trackType]->removeClip( uuid, trackId );
computeLength(); if ( clip != NULL )
emit clipRemoved( clip, trackId, trackType ); {
computeLength();
emit clipRemoved( clip, trackId, trackType );
}
return clip; return clip;
} }
......
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