]> git.sesse.net Git - kdenlive/commitdiff
Fix crash on clip deletion
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Mon, 15 Feb 2010 22:54:21 +0000 (22:54 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Mon, 15 Feb 2010 22:54:21 +0000 (22:54 +0000)
svn path=/trunk/kdenlive/; revision=4307

src/clipitem.cpp

index fb98344264e12bac5cee5af2d55717450e30491f..3d43267d5f480b665f44ef203122d109ad31f143 100644 (file)
@@ -698,7 +698,8 @@ void ClipItem::paint(QPainter *painter,
         } else mappedRect = mapped;
 
         double scale = painter->matrix().m11();
-        int channels = baseClip()->getProperty("channels").toInt();
+        int channels = 0;
+        if (isEnabled() && m_clip) channels = m_clip->getProperty("channels").toInt();
         if (scale != m_framePixelWidth)
             m_audioThumbCachePic.clear();
         double cropLeft = m_info.cropStart.frames(m_fps);