@@ -199,19 +199,26 @@ void common_hal_displayio_display_construct(displayio_display_obj_t* self,
199
199
200
200
bool common_hal_displayio_display_show (displayio_display_obj_t * self , displayio_group_t * root_group ) {
201
201
if (root_group == NULL ) {
202
- root_group = & circuitpython_splash ;
202
+ if (!circuitpython_splash .in_group ) {
203
+ root_group = & circuitpython_splash ;
204
+ } else if (self -> current_group == & circuitpython_splash ) {
205
+ return false;
206
+ }
203
207
}
204
208
if (root_group == self -> current_group ) {
205
209
return true;
206
210
}
207
- if (root_group -> in_group ) {
211
+ if (root_group != NULL && root_group -> in_group ) {
208
212
return false;
209
213
}
210
214
if (self -> current_group != NULL ) {
211
215
self -> current_group -> in_group = false;
212
216
}
213
- displayio_group_update_transform (root_group , & self -> transform );
214
- root_group -> in_group = true;
217
+
218
+ if (root_group != NULL ) {
219
+ displayio_group_update_transform (root_group , & self -> transform );
220
+ root_group -> in_group = true;
221
+ }
215
222
self -> current_group = root_group ;
216
223
self -> full_refresh = true;
217
224
common_hal_displayio_display_refresh_soon (self );
@@ -402,6 +409,10 @@ void displayio_display_update_backlight(displayio_display_obj_t* self) {
402
409
}
403
410
404
411
void release_display (displayio_display_obj_t * self ) {
412
+ if (self -> current_group != NULL ) {
413
+ self -> current_group -> in_group = false;
414
+ }
415
+
405
416
if (self -> backlight_pwm .base .type == & pulseio_pwmout_type ) {
406
417
common_hal_pulseio_pwmout_reset_ok (& self -> backlight_pwm );
407
418
common_hal_pulseio_pwmout_deinit (& self -> backlight_pwm );
0 commit comments