Initialize pointer
This commit is contained in:
1 parent
9e8a6f4805
commit
07c189d399
1 file changed
+1
-1
@@ -39,7 +39,7 @@ static QString getLastErrorString()
|
||||
{
|
||||
DWORD lastErrorId = GetLastError();
|
||||
|
||||
TCHAR* msgBuf;
|
||||
TCHAR* msgBuf = nullptr;
|
||||
const auto formatFlags = FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS;
|
||||
|
||||
if(FormatMessage(formatFlags, nullptr, lastErrorId, 0, reinterpret_cast<LPTSTR>(&msgBuf), 0, nullptr) == 0) {
|
||||
|
||||
Reference in new issue
Block a user