Skip to content

clutter/stage: Steal and manually free pending_queue_redraw entries

Daniel van Vugt requested to merge vanvugt/mutter:fix-1557-v2 into master

New entries indirectly added to pending_queue_redraw during the loop would make our iterator invalid and cause g_hash_table_iter_next to fail without having visited all elements. That was seen as assertion failures but also likely resulted in incomplete paint clips.

Now we steal the iterator's entry before such corruption can happen, free it manually, and reset the iterator to the beginning on every iteration. This is actually safe and efficient because we're removing each entry we visit. So no time is wasted in resuming from the (new) beginning of the hash table.

Fixes: #1557 (closed)

Edited by Daniel van Vugt

Merge request reports