fix crash when closing cli output buffer

master
Allen Webster 2021-01-24 14:12:14 -08:00
parent 1eff9eaa90
commit 7c822233c5
1 changed files with 10 additions and 0 deletions

View File

@ -920,6 +920,16 @@ buffer_kill(Application_Links *app, Buffer_ID buffer_id, Buffer_Kill_Flag flags)
} }
} }
Child_Process_Container *child_processes = &models->child_processes;
for (Node *node = child_processes->child_process_active_list.next;
node != &child_processes->child_process_active_list;
node = node->next){
Child_Process *child_process = CastFromMember(Child_Process, node, node);
if (child_process->out_file == file){
child_process->out_file = 0;
}
}
result = BufferKillResult_Killed; result = BufferKillResult_Killed;
} }
else{ else{