[ili9xxx] Guard against null buffer in display_() when allocation fails (#15786)

This commit is contained in:
J. Nick Koston
2026-04-16 09:01:55 -10:00
committed by Jesse Hills
parent 81fb6712fe
commit 9cb2b562b9
2 changed files with 6 additions and 0 deletions
@@ -1,5 +1,7 @@
#pragma once
#include <cstdint>
namespace esphome {
namespace ili9xxx {
@@ -229,6 +229,10 @@ void ILI9XXXDisplay::update() {
}
void ILI9XXXDisplay::display_() {
// buffer may be null if allocation failed
if (this->buffer_ == nullptr) {
return;
}
// check if something was displayed
if ((this->x_high_ < this->x_low_) || (this->y_high_ < this->y_low_)) {
return;