diff --git a/lib/base/configobject.cpp b/lib/base/configobject.cpp index 81ea917b6..d4592b4ef 100644 --- a/lib/base/configobject.cpp +++ b/lib/base/configobject.cpp @@ -413,13 +413,7 @@ void ConfigObject::OnConfigLoaded() void ConfigObject::OnAllConfigLoaded() { - static ConfigType *ctype; - - if (!ctype) { - Type::Ptr type = Type::GetByName("Zone"); - ctype = dynamic_cast(type.get()); - } - + static ConfigType *ctype = dynamic_cast(Type::GetByName("Zone").get()); String zoneName = GetZoneName(); if (!zoneName.IsEmpty())