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:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user