Skip to content

Commit 5c41950

Browse files
authored
Merge pull request #10306 from FoamyGuy/tilepalettemapper_fix
TilePaletteMapper memory fix
2 parents 88f6117 + 8a9d78a commit 5c41950

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shared-module/tilepalettemapper/TilePaletteMapper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ void common_hal_tilepalettemapper_tilepalettemapper_construct(tilepalettemapper_
1818
self->input_color_count = input_color_count;
1919
self->needs_refresh = false;
2020
int mappings_len = width * height;
21-
self->tile_mappings = (uint32_t **)m_malloc_without_collect(mappings_len * sizeof(uint32_t *));
21+
self->tile_mappings = (uint32_t **)m_malloc(mappings_len * sizeof(uint32_t *));
2222
for (int i = 0; i < mappings_len; i++) {
2323
self->tile_mappings[i] = (uint32_t *)m_malloc_without_collect(input_color_count * sizeof(uint32_t));
2424
if (mp_obj_is_type(self->pixel_shader, &displayio_palette_type)) {

0 commit comments

Comments
 (0)