mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 10:46:51 +08:00
Fixed crash on unload (delete) of uninitialized stateIdentifier
This commit is contained in:
@@ -29,13 +29,14 @@ namespace alpr
|
|||||||
AlprImpl::AlprImpl(const std::string country, const std::string configFile, const std::string runtimeDir)
|
AlprImpl::AlprImpl(const std::string country, const std::string configFile, const std::string runtimeDir)
|
||||||
{
|
{
|
||||||
config = new Config(country, configFile, runtimeDir);
|
config = new Config(country, configFile, runtimeDir);
|
||||||
|
|
||||||
|
plateDetector = ALPR_NULL_PTR;
|
||||||
|
stateIdentifier = ALPR_NULL_PTR;
|
||||||
|
ocr = ALPR_NULL_PTR;
|
||||||
|
|
||||||
// Config file or runtime dir not found. Don't process any further.
|
// Config file or runtime dir not found. Don't process any further.
|
||||||
if (config->loaded == false)
|
if (config->loaded == false)
|
||||||
{
|
{
|
||||||
plateDetector = ALPR_NULL_PTR;
|
|
||||||
stateIdentifier = ALPR_NULL_PTR;
|
|
||||||
ocr = ALPR_NULL_PTR;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user