Commit b19a225a authored by Dmitry Kazakov's avatar Dmitry Kazakov

Fix crash when loading a file with Onion Skins activated

Thanks Timothee Giet for catching this bug!
parent 2ee47384
......@@ -286,7 +286,10 @@ void KisPaintLayer::setOnionSkinEnabled(bool state)
}
nodeProperties().setProperty("onionskin", state);
m_d->contentChannel->setOnionSkinsEnabled(state);
if (m_d->contentChannel) {
m_d->contentChannel->setOnionSkinsEnabled(state);
}
baseNodeChangedCallback();
}
......@@ -306,5 +309,7 @@ void KisPaintLayer::enableAnimation()
m_d->contentChannel = m_d->paintDevice->createKeyframeChannel(KisKeyframeChannel::Content, this);
addKeyframeChannel(m_d->contentChannel);
m_d->contentChannel->setOnionSkinsEnabled(onionSkinEnabled());
KisLayer::enableAnimation();
}
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