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