diff --git a/src/openalpr/alpr_impl.cpp b/src/openalpr/alpr_impl.cpp index f697897..0d9f7d8 100644 --- a/src/openalpr/alpr_impl.cpp +++ b/src/openalpr/alpr_impl.cpp @@ -29,13 +29,14 @@ namespace alpr AlprImpl::AlprImpl(const std::string country, const std::string configFile, const std::string 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. if (config->loaded == false) { - plateDetector = ALPR_NULL_PTR; - stateIdentifier = ALPR_NULL_PTR; - ocr = ALPR_NULL_PTR; return; }