Commit b30b3b89 authored by Tusooa Zhu's avatar Tusooa Zhu 🅱

Fix a crash when creating snapshot with no open document

parent f0d23431
......@@ -180,6 +180,9 @@ void KisSnapshotModel::setCanvas(QPointer<KisCanvas2> canvas)
bool KisSnapshotModel::slotCreateSnapshot()
{
if (!m_d->curDocument()) {
return false;
}
QPointer<KisDocument> clonedDoc(m_d->curDocument()->lockAndCreateSnapshot());
if (clonedDoc) {
beginInsertRows(QModelIndex(), m_d->curDocList.size(), m_d->curDocList.size());
......
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