From 59611b8b378238e5a589a87061d06fe4f337d1a0 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Thu, 26 Nov 2015 00:34:30 +0100 Subject: Windows: solve crash caused by system function FormatMessage failure on rare cases. --- src/Common/Dlgcode.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Common/Dlgcode.h') diff --git a/src/Common/Dlgcode.h b/src/Common/Dlgcode.h index 2b6aee18..af983a63 100644 --- a/src/Common/Dlgcode.h +++ b/src/Common/Dlgcode.h @@ -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 -- cgit v1.2.3