commit 1b36a6453e8af4bb7d7d470fa22c83200055b57e Author: Hubert Figuière Date: Wed Oct 19 14:16:50 2022 -0400 Fix crash on device detection diff --git a/src/ES2Command/Src/Interface/ipc/ipcInterfaceImpl.cpp b/src/ES2Command/Src/Interface/ipc/ipcInterfaceImpl.cpp index 0390a71..d98cd21 100644 --- a/src/ES2Command/Src/Interface/ipc/ipcInterfaceImpl.cpp +++ b/src/ES2Command/Src/Interface/ipc/ipcInterfaceImpl.cpp @@ -131,7 +131,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));