summaryrefslogtreecommitdiff
path: root/shared-module/sharpdisplay/SharpMemoryFramebuffer.c
diff options
context:
space:
mode:
authorhierophect <hierophect@gmail.com>2020-10-05 13:02:42 -0400
committerGitHub <noreply@github.com>2020-10-05 13:02:42 -0400
commite93a274f2fbddaaa0f58d5759316bbc99aa8c41e (patch)
treeab8201492a543da223062d5803bbd3350b71550c /shared-module/sharpdisplay/SharpMemoryFramebuffer.c
parent0467a828808f15cc5f0e502667f61e4a448450df (diff)
parent9535edb8f4be7a01158b75c78a2a56fe11e6d3f0 (diff)
Merge branch 'main' into esp32-analogin
Diffstat (limited to 'shared-module/sharpdisplay/SharpMemoryFramebuffer.c')
-rw-r--r--shared-module/sharpdisplay/SharpMemoryFramebuffer.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/shared-module/sharpdisplay/SharpMemoryFramebuffer.c b/shared-module/sharpdisplay/SharpMemoryFramebuffer.c
index 71e00d7f0..c23446828 100644
--- a/shared-module/sharpdisplay/SharpMemoryFramebuffer.c
+++ b/shared-module/sharpdisplay/SharpMemoryFramebuffer.c
@@ -90,10 +90,6 @@ bool common_hal_sharpdisplay_framebuffer_get_pixels_in_byte_share_row(sharpdispl
}
void common_hal_sharpdisplay_framebuffer_reset(sharpdisplay_framebuffer_obj_t *self) {
- if (!allocation_from_ptr(self->bufinfo.buf)) {
- self->bufinfo.buf = NULL;
- }
-
if (self->bus != &self->inline_bus
#if BOARD_SPI
&& self->bus != common_hal_board_get_spi()
@@ -105,7 +101,9 @@ void common_hal_sharpdisplay_framebuffer_reset(sharpdisplay_framebuffer_obj_t *s
}
void common_hal_sharpdisplay_framebuffer_reconstruct(sharpdisplay_framebuffer_obj_t *self) {
-
+ if (!allocation_from_ptr(self->bufinfo.buf)) {
+ self->bufinfo.buf = NULL;
+ }
}
void common_hal_sharpdisplay_framebuffer_get_bufinfo(sharpdisplay_framebuffer_obj_t *self, mp_buffer_info_t *bufinfo) {