output: destroy Layouts on Output removal
The Layout struct holds a pointer to the Output which becomes invalid when the Output is destroyed so we must ensure all the layouts of an Output are destroyed first.
This commit is contained in:
@ -206,6 +206,9 @@ pub fn removeOutput(self: *Self, output: *Output) void {
|
||||
}
|
||||
}
|
||||
|
||||
// Destroy all layouts of the output
|
||||
while (output.layouts.first) |layout_node| layout_node.data.destroy();
|
||||
|
||||
// Arrange the root in case evacuated views affect the layout
|
||||
fallback_output.arrangeViews();
|
||||
self.startTransaction();
|
||||
|
Reference in New Issue
Block a user