The node pointer is reused in the if (data->full_refresh) block
causing the following sprite list walking to fail. Fix this by
moving the sprite list first node getting next to the while loop
where it belongs.
ply_list_sort_stable (data->sprite_list, &sprite_compare_z);
- node = ply_list_get_first_node (data->sprite_list);
-
-
if (data->full_refresh) {
for (node = ply_list_get_first_node (data->displays);
node;
data->full_refresh = false;
}
+ node = ply_list_get_first_node (data->sprite_list);
while (node) {
sprite_t *sprite = ply_list_node_get_data (node);
ply_list_node_t *next_node = ply_list_get_next_node (data->sprite_list,