Skip to content

compositor: Fix surface accounting at MetaWindowActor

When the actor gets a new "main" surface assigned, it adds the new surface to the stack of surface actors, but forgets to remove the old one.

This stale pointer in the array may cause invalid reads and crashes after the assigned surface is disposed, e.g. when destroying the MetaWindowActor tries to disconnect signals from all accounted surface actors.

Fixes: 9a2c8b25 ("window: Add suspend state")

Merge request reports