Fix possible crash on audio thumb display

CCBUG: 356887
This commit is contained in:
Jean-Baptiste Mardelle
2015-12-21 21:32:40 +01:00
parent 0ceba37173
commit a5560c935c

View File

@@ -734,7 +734,7 @@ void ClipItem::paint(QPainter *painter,
}
}
// draw audio thumbnails
if (KdenliveSettings::audiothumbnails() && m_speed == 1.0 && m_clipState != PlaylistState::VideoOnly && ((m_clipType == AV && (exposed.bottom() > (rect().height() / 2) || m_clipState == PlaylistState::AudioOnly)) || m_clipType == Audio) && m_audioThumbReady) {
if (KdenliveSettings::audiothumbnails() && m_speed == 1.0 && m_clipState != PlaylistState::VideoOnly && ((m_clipType == AV && (exposed.bottom() > (rect().height() / 2) || m_clipState == PlaylistState::AudioOnly)) || m_clipType == Audio) && m_audioThumbReady && !m_binClip->audioFrameCache.isEmpty()) {
int startpixel = exposed.left();
if (startpixel < 0)
startpixel = 0;