Skip to content

Commit be62a4f

Browse files
committed
Fix typo copying HBITMAP
1 parent 8ed3dff commit be62a4f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Sources/Overlays/_Testing_WinSDK/Attachments/HBITMAP+AttachableAsIWICBitmap.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ extension HBITMAP__: _AttachableByAddressAsIWICBitmap {
2828
}
2929

3030
public static func _copyAttachableValue(at imageAddress: UnsafeMutablePointer<Self>) throws -> UnsafeMutablePointer<Self> {
31-
let result: HBITMAP? = CopyImage(imageAddress, UINT(IMAGE_BITMAP), 0, 0, 0).assumingMemoryBound(to: Self.self)
32-
guard let result else {
31+
guard let result = CopyImage(imageAddress, UINT(IMAGE_BITMAP), 0, 0, 0)?.assumingMemoryBound(to: Self.self) else {
3332
throw Win32Error(rawValue: GetLastError())
3433
}
3534
return result

0 commit comments

Comments
 (0)