Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions shared/src/native-src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,12 @@ namespace shared
UUID uuid;
UuidCreate(&uuid);

unsigned char* str;
UuidToStringA(&uuid, &str);
unsigned char* str = nullptr;
if (UuidToStringA(&uuid, &str) != RPC_S_OK)
{
// str is left untouched on failure, so there is nothing to free
return GenerateUuidV4();
}

std::string s((char*) str);

Expand Down
Loading