Fix overlapping accesses to image container
This commit is contained in:
parent
2e196c221e
commit
2e316954d8
|
@ -189,7 +189,8 @@ extension GIFAnimatable {
|
||||||
/// Updates the image with a new frame if necessary.
|
/// Updates the image with a new frame if necessary.
|
||||||
public func updateImageIfNeeded() {
|
public func updateImageIfNeeded() {
|
||||||
if var imageContainer = self as? ImageContainer {
|
if var imageContainer = self as? ImageContainer {
|
||||||
imageContainer.image = activeFrame ?? imageContainer.image
|
let container = imageContainer
|
||||||
|
imageContainer.image = activeFrame ?? container.image
|
||||||
} else {
|
} else {
|
||||||
layer.contents = activeFrame?.cgImage
|
layer.contents = activeFrame?.cgImage
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue