8000 displayio: Fix matrixportal crash · joric/circuitpython@b159256 · GitHub
[go: up one dir, main page]

Skip to content

Commit b159256

Browse files
committed
displayio: Fix matrixportal crash
An RGBMatrix has no bus and no bus_free method. It is always possible to refresh the display. This was not a problem before, but the fix I suggested (adafruit#3449) added a call to core_bus_free when a FramebufferDisplay was being refreshed. This was not caught during testing. This is a band-aid fix and it brings to light a second problem in which a SharpDisplay + FrameBuffer will not have a 'bus' object, and yet does operate using a shared SPI bus. This kind of display will need a "bus-free" like function to be added, or it can have problems like adafruit#3309.
1 parent e114b5a commit b159256

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shared-module/displayio/display_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ bool displayio_display_core_get_dither(displayio_display_core_t* self){
197197
}
198198

199199
bool displayio_display_core_bus_free(displayio_display_core_t *self) {
200-
return self->bus_free(self->bus);
200+
return !self->bus || self->bus_free(self->bus);
201201
}
202202

203203
bool displayio_display_core_begin_transaction(displayio_display_core_t* self) {

0 commit comments

Comments
 (0)
0