Fixed crash on unload (delete) of uninitialized stateIdentifier

This commit is contained in:
Matt Hill 2015-01-11 22:15:42 -05:00
parent 70dbe38762
commit 64e29675b2

View File

@ -30,12 +30,13 @@ namespace alpr
{
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.
if (config->loaded == false)
{
plateDetector = ALPR_NULL_PTR;
stateIdentifier = ALPR_NULL_PTR;
ocr = ALPR_NULL_PTR;
return;
}