framebufferio: Set type to none when releasing

This avoids the message "Too many displays in use" when they are released
directly, rather than via release_displays().
This commit is contained in:
Jeff Epler 2020-07-31 14:35:50 -05:00
parent 5a7b2a2038
commit 6d19a09888
1 changed files with 1 additions and 0 deletions

View File

@ -309,6 +309,7 @@ void release_framebufferdisplay(framebufferio_framebufferdisplay_obj_t* self) {
common_hal_framebufferio_framebufferdisplay_set_auto_refresh(self, false);
release_display_core(&self->core);
self->framebuffer_protocol->deinit(self->framebuffer);
self->base.type = &mp_type_NoneType;
}
void reset_framebufferdisplay(framebufferio_framebufferdisplay_obj_t* self) {