1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 11:33:03 +01:00
This commit is contained in:
Ted John
2016-10-14 00:01:34 +01:00
parent 00c47b8a04
commit f519bc6cad
3 changed files with 16 additions and 10 deletions

View File

@@ -177,8 +177,13 @@ namespace String
utf8 * Duplicate(const utf8 * src)
{
size_t srcSize = SizeOf(src);
return Memory::DuplicateArray(src, srcSize + 1);
utf8 * result = nullptr;
if (src != nullptr)
{
size_t srcSize = SizeOf(src);
result = Memory::DuplicateArray(src, srcSize + 1);
}
return result;
}
utf8 * DiscardUse(utf8 * * ptr, utf8 * replacement)