diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts index cfbafeba3f617010a2d52acbff077205bc6e5de6..0ae7c7b1257d6c6a72f513c69411436c4f15b90a 100644 --- a/src/vs/workbench/browser/layout.ts +++ b/src/vs/workbench/browser/layout.ts @@ -750,6 +750,12 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi workbenchGrid = SerializableGrid.deserialize(parsedGrid, { fromJSON }, { proportionalLayout: false }); const root = workbenchGrid.getViews(); + const titleBarSection = root.children[0]; + + if (isGridBranchNode(titleBarSection) || titleBarSection.view !== this.titleBarPartView) { + throw new Error('Bad grid'); + } + const middleSection = root.children[1] as GridBranchNode; this.state.sideBar.position = (middleSection.children[0] as GridLeafNode).view === this.activityBarPartView ? Position.LEFT : Position.RIGHT; this.state.panel.position = isGridBranchNode(middleSection.children[2]) ? Position.BOTTOM : Position.RIGHT;