mirror of
https://github.com/esphome/esphome.git
synced 2026-02-08 00:31:58 +00:00
[core] Add capacity check to register_component_ (#13778)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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