From 4cede77f510443b5119644e9c54c6a5f9f1ba791 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hubert=20Figui=C3=A8re?= Date: Sat, 1 Jun 2024 19:41:51 -0400 Subject: [PATCH 2/5] Fix crash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Hubert Figuière --- src/ES2Command/Src/Interface/ipc/ipcInterfaceImpl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ES2Command/Src/Interface/ipc/ipcInterfaceImpl.cpp b/src/ES2Command/Src/Interface/ipc/ipcInterfaceImpl.cpp index 86e9969..eb17c22 100644 --- a/src/ES2Command/Src/Interface/ipc/ipcInterfaceImpl.cpp +++ b/src/ES2Command/Src/Interface/ipc/ipcInterfaceImpl.cpp @@ -133,7 +133,9 @@ ESErrorCode IPCInterfaceImpl::Open() if(!ES_IsExistFile(dat_file)){ FILE *fp; fp = fopen(dat_file.c_str(),"w"); - fclose(fp); + if (fp) { + fclose(fp); + } } interrupt_.reset(new ipc_interrupt(delegate_, dat_file, IPC_SHARED_ID, IPC_SEMAHORE_KEY)); -- 2.51.0