Commit 5559ae51 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Prevent crash if a media has a 0 length

parent 20c2dcf1
......@@ -56,7 +56,7 @@ void
ClipRenderer::setMedia( Media *media )
{
m_selectedMedia = media;
if ( media == NULL )
if ( media == NULL || media->getLengthMS() == 0 )
{
m_previewLabel->clear();
return ;
......@@ -77,7 +77,7 @@ ClipRenderer::setMedia( Media *media )
void
ClipRenderer::setClip( Clip *clip )
{
if ( clip == NULL )
if ( clip == NULL || clip->getLength() == 0 )
{
m_selectedMedia = NULL;
m_previewLabel->clear();
......
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