Fix possible crash on subclip thumbnail creation

parent 04087980
Pipeline #19741 passed with stage
in 12 minutes and 14 seconds
......@@ -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
......
Markdown is supported
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