Skip to content

Commit 8712e19

Browse files
committed
Adds missing RGB busses from being deinited properly.
1 parent abb5f73 commit 8712e19

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ext_mod/lcd_bus/esp32_src/rgb_bus.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,11 @@
412412
mp_raise_msg_varg(&mp_type_ValueError, self->init_err_msg, self->init_err);
413413
return self->init_err;
414414
} else {
415+
// add the new bus ONLY after successfull initilization of the bus
416+
rgb_bus_count++;
417+
m_realloc(rgb_bus_objs, rgb_bus_count * sizeof(mp_lcd_rgb_bus_obj_t *));
418+
rgb_bus_objs[rgb_bus_count - 1] = self;
419+
415420
return LCD_OK;
416421
}
417422
}

0 commit comments

Comments
 (0)