Skip to content

Commit 334afc9

Browse files
committed
Camera (macOS): fix crashing on old macOS version
Fix #1594
1 parent 64f9e53 commit 334afc9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/detection/camera/camera_apple.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
AVCaptureDeviceType deviceType = NULL;
2020

2121
#ifdef MAC_OS_VERSION_14_0
22-
if (@available(macOS 14.0, *))
22+
// Strangely `@available(macOS 14.0, *)` doesn't work here (#1594)
23+
if (@available(macOS 14.0, *) && &AVCaptureDeviceTypeExternal)
2324
{
2425
deviceType = AVCaptureDeviceTypeExternal;
2526
}

0 commit comments

Comments
 (0)