Commit efe3ee4d authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix possible crash on subclip thumbnail creation

parent df397caa
......@@ -158,6 +158,10 @@ bool ThumbJob::commitResult(Fun &undo, Fun &redo)
bool ok = false;
if (m_subClip) {
auto subClip = std::static_pointer_cast<ProjectSubClip>(pCore->projectItemModel()->getItemByBinId(m_clipId));
if (subClip == nullptr) {
// Subclip was deleted
return ok;
QImage old = subClip->thumbnail(m_result.width(), m_result.height()).toImage();
// note that the image is moved into lambda, it won't be available from this class anymore
Supports Markdown
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