Skip to content

Commit

Permalink
fix: CGError::Failure handle
Browse files Browse the repository at this point in the history
  • Loading branch information
richiemcilroy committed Jul 9, 2024
1 parent 22e1e01 commit 2a8db9c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/desktop/src-tauri/src/capture/src/quartz/capturer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

1 comment on commit 2a8db9c

@vercel
Copy link

@vercel vercel bot commented on 2a8db9c Jul 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.