Skip to content

Commit

Permalink
main: Do not access screencopy in detached mode
Browse files Browse the repository at this point in the history
  • Loading branch information
onluen authored and any1 committed Sep 28, 2024
1 parent 3490c32 commit 561eab6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2064,11 +2064,13 @@ int main(int argc, char* argv[])
else if (use_external_fd)
socket_type = SOCKET_TYPE_FROM_FD;

if (!start_detached && !configure_screencopy(&self))
goto screencopy_failure;
if (!start_detached) {
if (!configure_screencopy(&self))
goto screencopy_failure;

self.screencopy->on_done = on_capture_done;
self.screencopy->userdata = &self;
self.screencopy->on_done = on_capture_done;
self.screencopy->userdata = &self;
}

if (show_performance)
self.performance_ticker = aml_ticker_new(1000000, on_perf_tick,
Expand Down

0 comments on commit 561eab6

Please sign in to comment.