File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -527,7 +527,8 @@ primary_display_t *allocate_display_or_raise(void) {
527527primary_display_bus_t * allocate_display_bus (void ) {
528528 for (uint8_t i = 0 ; i < max_allocated_display ; i ++ ) {
529529 mp_const_obj_t display_bus_type = DYN_DISPLAY_BUSES (i ).bus_base .type ;
530- if (display_bus_type == NULL || display_bus_type == & mp_type_NoneType ) {
530+ if ((display_bus_type == NULL || display_bus_type == & mp_type_NoneType ) &&
531+ (i >= CIRCUITPY_DISPLAY_LIMIT || (!is_display_active (DYN_DISPLAYS_ADR (i , display_base ))))) {
531532 // Clear this memory so it is in a known state before init.
532533 memset (DYN_DISPLAY_BUSES_ADR0 (i ), 0 , sizeof (display_buses [0 ]));
533534 #if CIRCUITPY_OS_GETENV && CIRCUITPY_SET_DISPLAY_LIMIT
You can’t perform that action at this time.
0 commit comments