1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 19:08:26 -06:00

Windows: solve crash caused by system function FormatMessage failure on rare cases.

This commit is contained in:
Mounir IDRASSI
2015-11-26 00:34:30 +01:00
parent 90bd57fe40
commit 59611b8b37
3 changed files with 28 additions and 9 deletions

View File

@@ -562,7 +562,7 @@ std::string IntToString (int val);
std::wstring IntToWideString (int val);
inline std::wstring AppendSrcPos (const wchar_t* msg, const char* srcPos)
{
return std::wstring (msg) + L"\n\nSource: " + SingleStringToWide (srcPos);
return std::wstring (msg? msg : L"") + L"\n\nSource: " + SingleStringToWide (srcPos);
}
// Display a wait dialog while calling the provided callback with the given parameter