Commit 19fa3631 authored by Christophe Courtaut's avatar Christophe Courtaut

Fixed crashes in MediaLibrary

parent 669f124e
......@@ -95,7 +95,10 @@ void MediaCellView::mouseDoubleClickEvent( QMouseEvent* event )
{
if ( ( event->buttons() | Qt::LeftButton ) == Qt::LeftButton )
{
ClipProperty* mp = new ClipProperty( Library::getInstance()->clip( m_uuid ), this );
Clip* clip = Library::getInstance()->clip( m_uuid );
if ( clip == NULL )
return;
ClipProperty* mp = new ClipProperty( clip, this );
mp->setModal( true );
mp->show();
}
......
......@@ -67,6 +67,8 @@ Library::clip( const QUuid& uuid )
if ( m_medias.contains( uuid ) )
{
Media* media = m_medias.value( uuid );
if ( media->baseClip() == NULL )
return NULL;
Clip* clip = new Clip( media->baseClip() );
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