Tweak to try to reduce low space builds

This commit is contained in:
gamblor21 2023-03-18 10:01:41 -05:00
parent 2c1e2061db
commit 3020893ba2
1 changed files with 1 additions and 2 deletions

View File

@ -49,11 +49,10 @@ void common_hal_displayio_bitmap_construct_from_buffer(displayio_bitmap_t *self,
self->width = width;
self->height = height;
self->stride = stride(width, bits_per_value);
self->data_alloc = false;
if (!data) {
data = m_malloc(self->stride * height * sizeof(uint32_t), false);
self->data_alloc = true;
} else {
self->data_alloc = false;
}
self->data = data;
self->read_only = read_only;