We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b1dfc0 commit ad067f7Copy full SHA for ad067f7
SDWebImageSwiftUI/Classes/ImagePlayer.swift
@@ -78,8 +78,12 @@ public final class ImagePlayer : ObservableObject {
78
79
self.player = imagePlayer
80
81
- let posterFrame = PlatformImage(cgImage: animatedImage.cgImage!, scale: animatedImage.scale, orientation: .up)
82
- currentFrame = posterFrame
+ // Setup poster frame
+ if let cgImage = animatedImage.cgImage {
83
+ currentFrame = PlatformImage(cgImage: cgImage, scale: animatedImage.scale, orientation: .up)
84
+ } else {
85
+ currentFrame = .empty
86
+ }
87
}
88
89
0 commit comments