return None for NULL

This commit is contained in:
foamyguy 2022-11-28 09:03:03 -06:00
parent b8d6605cff
commit 553d48f887
1 changed files with 3 additions and 0 deletions

View File

@ -206,6 +206,9 @@ mp_obj_t common_hal_displayio_display_get_bus(displayio_display_obj_t *self) {
}
mp_obj_t common_hal_displayio_display_get_root_group(displayio_display_obj_t *self) {
if (self->core.current_group == NULL) {
return mp_const_none;
}
return self->core.current_group;
}