Commit 8456bc8d authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

ClipRenderer: Fix a crash when removing the clip being previewd.

parent ddb0913b
......@@ -60,9 +60,12 @@ ClipRenderer::~ClipRenderer()
void
ClipRenderer::setClip( Clip* clip )
{
if ( m_selectedClip != NULL && clip != NULL &&
clip->uuid() != m_selectedClip->uuid() )
// if the clip is different (or NULL) we have to stop playback.
if ( m_selectedClip != NULL &&
( ( clip != NULL && clip->uuid() != m_selectedClip->uuid() ) || clip == NULL ) )
{
clipUnloaded( m_selectedClip->uuid() );
}
if ( clip == NULL )
{
m_selectedClip = NULL;
......
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