Skip to content

Commit

Permalink
retain exported NSRunningApplication reference to avoid autorelease
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldguy committed Jul 28, 2021
1 parent 8777db4 commit db3e811
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/workspace.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void workspace_event_handler_end(void *context)

void *workspace_application_create_running_ns_application(struct process *process)
{
return [NSRunningApplication runningApplicationWithProcessIdentifier:process->pid];
return [[NSRunningApplication runningApplicationWithProcessIdentifier:process->pid] retain];
}

void workspace_application_destroy_running_ns_application(void *ws_context, struct process *process)
Expand Down

0 comments on commit db3e811

Please sign in to comment.