Tier0: return empty if UuidToStringA fails

UuidToStringA could fail, return an empty in this case.
This commit is contained in:
Kawe Mazidjatari 2024-11-22 15:05:35 +01:00
parent 59bdc55d15
commit a003e21f6e

View File

@ -456,9 +456,15 @@ string CreateUUID()
char* str;
UuidToStringA(&uuid, (RPC_CSTR*)&str);
string result(str);
RpcStringFreeA((RPC_CSTR*)&str);
string result;
if (str)
{
result = str;
RpcStringFreeA((RPC_CSTR*)&str);
}
return result;
}