return None instead of NULL for framebuffer and epaper

This commit is contained in:
foamyguy 2022-12-01 17:34:43 -06:00
parent 42f1d50acc
commit 57462092b5
2 changed files with 6 additions and 0 deletions

View File

@ -247,6 +247,9 @@ uint16_t common_hal_displayio_epaperdisplay_get_rotation(displayio_epaperdisplay
} }
mp_obj_t common_hal_displayio_epaperdisplay_get_root_group(displayio_epaperdisplay_obj_t *self) { mp_obj_t common_hal_displayio_epaperdisplay_get_root_group(displayio_epaperdisplay_obj_t *self) {
if (self->core.current_group == NULL) {
return mp_const_none;
}
return self->core.current_group; return self->core.current_group;
} }

View File

@ -363,6 +363,9 @@ void framebufferio_framebufferdisplay_reset(framebufferio_framebufferdisplay_obj
} }
mp_obj_t common_hal_framebufferio_framebufferdisplay_get_root_group(framebufferio_framebufferdisplay_obj_t *self) { mp_obj_t common_hal_framebufferio_framebufferdisplay_get_root_group(framebufferio_framebufferdisplay_obj_t *self) {
if (self->core.current_group == NULL) {
return mp_const_none;
}
return self->core.current_group; return self->core.current_group;
} }