summarylogtreecommitdiffstats
path: root/epsonscan2-crash.patch
diff options
context:
space:
mode:
Diffstat (limited to 'epsonscan2-crash.patch')
-rw-r--r--epsonscan2-crash.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/epsonscan2-crash.patch b/epsonscan2-crash.patch
new file mode 100644
index 000000000000..67fd8e46d26a
--- /dev/null
+++ b/epsonscan2-crash.patch
@@ -0,0 +1,21 @@
+commit 1b36a6453e8af4bb7d7d470fa22c83200055b57e
+Author: Hubert Figuière <hub@figuiere.net>
+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));