1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 11:33:03 +01:00

Fix #4139: Windows first time firewall launch

std::string can not handle nullptr as argument. Create and use helper method instead.
This commit is contained in:
Ted John
2016-07-19 21:53:18 +01:00
parent 583372e082
commit e5722e1d9a
3 changed files with 15 additions and 9 deletions

View File

@@ -28,6 +28,12 @@ extern "C"
namespace String
{
std::string ToStd(const utf8 * str)
{
if (str == nullptr) return std::string();
else return std::string(str);
}
bool IsNullOrEmpty(const utf8 * str)
{
return str == nullptr || str[0] == '\0';