Fix crash copying & pasting empty layers between documents

This commit is contained in:
David Capello 2014-08-20 08:29:21 -03:00
parent daa7adde14
commit 76919072e0

View File

@ -390,7 +390,7 @@ void clipboard::paste()
i <= srcRange.layerEnd() &&
i < LayerIndex(srcLayers.size()); ++i) {
Cel* lastCel = static_cast<LayerImage*>(srcLayers[i])->getLastCel();
if (maxFrame < lastCel->frame())
if (lastCel && maxFrame < lastCel->frame())
maxFrame = lastCel->frame();
}
if (dstSpr->totalFrames() < maxFrame.next())