mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-07 04:50:54 +08:00
Bugfix: If null or whitespace then set empty string (nullptr exception).
This commit is contained in:
@@ -121,6 +121,11 @@ namespace openalprnet
|
|||||||
}
|
}
|
||||||
void set(String^ value)
|
void set(String^ value)
|
||||||
{
|
{
|
||||||
|
if(String::IsNullOrWhiteSpace(value))
|
||||||
|
{
|
||||||
|
this->m_config->prewarp = "";
|
||||||
|
return;
|
||||||
|
}
|
||||||
this->m_config->prewarp = marshal_as<std::string>(value);
|
this->m_config->prewarp = marshal_as<std::string>(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -407,6 +412,11 @@ namespace openalprnet
|
|||||||
}
|
}
|
||||||
void set(String^ value)
|
void set(String^ value)
|
||||||
{
|
{
|
||||||
|
if (String::IsNullOrWhiteSpace(value))
|
||||||
|
{
|
||||||
|
this->m_config->prewarp = "";
|
||||||
|
return;
|
||||||
|
}
|
||||||
this->m_config->ocrLanguage = marshal_as<std::string>(value);
|
this->m_config->ocrLanguage = marshal_as<std::string>(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user