Set their parent to nullptr before deleting (as the board may have already been deleted). Likely fix for Sentry KICAD-79.