From 2a8db9c9eecdb16ea9a4674c3b409eccab76f5e5 Mon Sep 17 00:00:00 2001 From: Richie McIlroy <33632126+richiemcilroy@users.noreply.github.com> Date: Tue, 9 Jul 2024 16:50:14 +0100 Subject: [PATCH] fix: CGError::Failure handle --- apps/desktop/src-tauri/src/capture/src/quartz/capturer.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/desktop/src-tauri/src/capture/src/quartz/capturer.rs b/apps/desktop/src-tauri/src/capture/src/quartz/capturer.rs index 6d83f693..5dd74761 100644 --- a/apps/desktop/src-tauri/src/capture/src/quartz/capturer.rs +++ b/apps/desktop/src-tauri/src/capture/src/quartz/capturer.rs @@ -56,6 +56,10 @@ impl Capturer { stream }; + if queue.is_null() { + return Err(CGError::Failure); + } + match unsafe { CGDisplayStreamStart(stream) } { CGError::Success => Ok(Capturer { stream, queue, width, height, format, display