From 6779069b83446ef063cce1e48b617a98a333db60 Mon Sep 17 00:00:00 2001 From: isidor Date: Mon, 23 Oct 2017 15:01:27 +0200 Subject: [PATCH] Make sure both composites are known to this composite bar in move --- src/vs/workbench/browser/parts/compositebar/compositeBar.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vs/workbench/browser/parts/compositebar/compositeBar.ts b/src/vs/workbench/browser/parts/compositebar/compositeBar.ts index 7682c32759b..bbc33698401 100644 --- a/src/vs/workbench/browser/parts/compositebar/compositeBar.ts +++ b/src/vs/workbench/browser/parts/compositebar/compositeBar.ts @@ -403,6 +403,10 @@ export class CompositeBar implements ICompositeBar { } public move(compositeId: string, toCompositeId: string): void { + // Make sure both composites are known to this composite bar + if (this.options.composites.filter(c => c.id === compositeId || c.id === toCompositeId).length !== 2) { + return; + } // Make sure a moved composite gets pinned if (!this.isPinned(compositeId)) { this.pin(compositeId, false /* defer update, we take care of it */);