Public Access
Add explicit initialization check in ProtocolFactory
This commit is contained in:
1 parent
e70c936813
commit
f97093ae7d
1 file changed
+1
@@ -26,6 +26,7 @@ void ProtocolFactory::ensure_initialized() {
|
|||||||
// Registries are initialized on first access due to static storage
|
// Registries are initialized on first access due to static storage
|
||||||
// This function exists for explicit initialization if needed
|
// This function exists for explicit initialization if needed
|
||||||
static bool initialized = false;
|
static bool initialized = false;
|
||||||
|
if (!initialized) {
|
||||||
if (esphome::logger::global_logger != nullptr)
|
if (esphome::logger::global_logger != nullptr)
|
||||||
ESP_LOGD(FACTORY_TAG, "Protocol factory registries initialized");
|
ESP_LOGD(FACTORY_TAG, "Protocol factory registries initialized");
|
||||||
initialized = true;
|
initialized = true;
|
||||||
|
|||||||
Reference in new issue
Block a user