1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-02 11:22:24 +01:00

[lvgl] fix allocation of reduced size buffer with rotation (#10147)

This commit is contained in:
Clyde Stubbs
2025-08-11 08:32:01 +10:00
committed by GitHub
parent 581b4ef5a1
commit 8b67d6dfec

View File

@@ -451,7 +451,8 @@ void LvglComponent::setup() {
if (buffer == nullptr && this->buffer_frac_ == 0) {
frac = MIN_BUFFER_FRAC;
buffer_pixels /= MIN_BUFFER_FRAC;
buffer = lv_custom_mem_alloc(buf_bytes / MIN_BUFFER_FRAC); // NOLINT
buf_bytes /= MIN_BUFFER_FRAC;
buffer = lv_custom_mem_alloc(buf_bytes); // NOLINT
}
if (buffer == nullptr) {
this->status_set_error("Memory allocation failure");