forked from rosebudai/OpenRCT2-Web
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:
1 parent
583372e082
commit
e5722e1d9a
3 files changed
+15
-9
No files matched your search
@@ -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