Skip to content

Commit 553d48f

Browse files
committed
return None for NULL
1 parent b8d6605 commit 553d48f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

shared-module/displayio/Display.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,9 @@ mp_obj_t common_hal_displayio_display_get_bus(displayio_display_obj_t *self) {
206206
}
207207

208208
mp_obj_t common_hal_displayio_display_get_root_group(displayio_display_obj_t *self) {
209+
if (self->core.current_group == NULL) {
210+
return mp_const_none;
211+
}
209212
return self->core.current_group;
210213
}
211214

0 commit comments

Comments
 (0)