From 645eed7aae335fe3238e243f27e8f6a9a9de5825 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 25 Jan 2014 02:00:18 +0100 Subject: [PATCH] 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. --- src/customtrackview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.39.2