diff options
Diffstat (limited to 'zen/file_io.cpp')
-rw-r--r-- | zen/file_io.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/zen/file_io.cpp b/zen/file_io.cpp index c56d6ac0..00e33a60 100644 --- a/zen/file_io.cpp +++ b/zen/file_io.cpp @@ -32,11 +32,12 @@ Zstring getLockingProcessNames(const Zstring& filepath) //throw(), empty string const DllFun<FunType_getLockingProcesses> getLockingProcesses(getDllName(), funName_getLockingProcesses); const DllFun<FunType_freeString> freeString (getDllName(), funName_freeString); + const wchar_t* processList = nullptr; if (getLockingProcesses && freeString) - if (const wchar_t* procList = getLockingProcesses(filepath.c_str())) + if (getLockingProcesses(filepath.c_str(), processList)) { - ZEN_ON_SCOPE_EXIT(freeString(procList)); - return procList; + ZEN_ON_SCOPE_EXIT(freeString(processList)); + return processList; } } return Zstring(); |