[core] Add capacity check to register_component_ (#13778)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
eea7e9edff
commit
9eee4c9924
1 file changed
+4
@@ -81,6 +81,10 @@ void Application::register_component_(Component *comp) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (this->components_.size() >= ESPHOME_COMPONENT_COUNT) {
|
||||
ESP_LOGE(TAG, "Cannot register component %s - at capacity!", LOG_STR_ARG(comp->get_component_log_str()));
|
||||
return;
|
||||
}
|
||||
this->components_.push_back(comp);
|
||||
}
|
||||
void Application::setup() {
|
||||
|
||||
Reference in new issue
Block a user