summaryrefslogtreecommitdiff
path: root/shared-module
diff options
context:
space:
mode:
authorScott Shawcroft <scott@adafruit.com>2020-08-21 11:19:50 -0700
committerGitHub <noreply@github.com>2020-08-21 11:19:50 -0700
commit5771be9510be87c72a58cdf3f70ff3744d8ec169 (patch)
tree5db0cc26918345fe3673ff869989acc1398875a8 /shared-module
parent988e5caafc0866de6593d99632622a8fe62a9a9c (diff)
parent6d2d36db3d161fefadd52cc1f2d5a9da99bb2dc9 (diff)
Merge pull request #3292 from jepler/allocate_display_bus_bug
allocate_display_bus: fix bug where in-use bus would be returned
Diffstat (limited to 'shared-module')
-rw-r--r--shared-module/displayio/__init__.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/shared-module/displayio/__init__.c b/shared-module/displayio/__init__.c
index 4a6428ea0..101dac4b3 100644
--- a/shared-module/displayio/__init__.c
+++ b/shared-module/displayio/__init__.c
@@ -394,8 +394,8 @@ primary_display_t *allocate_display_or_raise(void) {
}
primary_display_t *allocate_display_bus(void) {
for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) {
- mp_const_obj_t display_type = displays[i].display.base.type;
- if (display_type == NULL || display_type == &mp_type_NoneType) {
+ mp_const_obj_t display_bus_type = displays[i].bus_base.type;
+ if (display_bus_type == NULL || display_bus_type == &mp_type_NoneType) {
return &displays[i];
}
}