From: Steinar H. Gunderson Date: Sat, 25 Jan 2014 01:00:18 +0000 (+0100) Subject: Fix an invalid cast to ClipItem. X-Git-Url: https://git.sesse.net/?p=kdenlive;a=commitdiff_plain;h=645eed7aae335fe3238e243f27e8f6a9a9de5825 Fix an invalid cast to ClipItem. Seemingly we can get a Transition into this code path; qgraphicsitem_cast<> will properly return NULL if it's not of the type we expect. --- diff --git a/src/customtrackview.cpp b/src/customtrackview.cpp index 186552f1..8786d494 100644 --- a/src/customtrackview.cpp +++ b/src/customtrackview.cpp @@ -1091,7 +1091,7 @@ void CustomTrackView::mousePressEvent(QMouseEvent * event) } m_selectionMutex.unlock(); if (m_dragItem) { - ClipItem *clip = static_cast (m_dragItem); + ClipItem *clip = qgraphicsitem_cast(m_dragItem); updateClipTypeActions(dragGroup == NULL ? clip : NULL); m_pasteEffectsAction->setEnabled(m_copiedItems.count() == 1); }