Regarding the segfault, it has to do with the destructor code in UI::Panel - if a panel gets destroyed, it also removes its children and is deleted from its parent's list of children. It seems like the reference from the buildingwindow to its parent was broken before it tried to access it for deleting the workarea overlay.
Regarding the segfault, it has to do with the destructor code in UI::Panel - if a panel gets destroyed, it also removes its children and is deleted from its parent's list of children. It seems like the reference from the buildingwindow to its parent was broken before it tried to access it for deleting the workarea overlay.