1
Fork 0

Protect against crashing with certain layers

This commit is contained in:
Joshua Goins 2022-11-21 11:09:28 -05:00
parent 871abdc616
commit fa70f9094b

View file

@ -61,7 +61,9 @@ class SilicaEngine {
maskContext?.fill(document.cgRect())
for chunk in layer.mask!.chunks {
maskContext?.draw(chunk.image!, in: document.getChunkRect(chunk))
if let image = chunk.image {
maskContext?.draw(image, in: document.getChunkRect(chunk))
}
}
}