Initialize pointer
This commit is contained in:
parent
9e8a6f4805
commit
07c189d399
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user