From 7c822233c5bc18dd57c0ea94d47fb57f4b10a0b1 Mon Sep 17 00:00:00 2001 From: Allen Webster Date: Sun, 24 Jan 2021 14:12:14 -0800 Subject: [PATCH] fix crash when closing cli output buffer --- 4ed_api_implementation.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/4ed_api_implementation.cpp b/4ed_api_implementation.cpp index 33162b27..6ae52c93 100644 --- a/4ed_api_implementation.cpp +++ b/4ed_api_implementation.cpp @@ -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; } else{