Remove child views before switching workspaces (#1371)

This was causing a crash on Windows because we were destroying a TabView
that was still parented to the window. Not sure why I couldn't repro
this on Mac...
This commit is contained in:
Evan Simkowitz 2024-12-02 19:53:25 -05:00 committed by GitHub
parent da48ab5e62
commit f606a74339
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -274,6 +274,7 @@ export class WaveBrowserWindow extends BaseWindow {
console.log("switchWorkspace newWs", newWs); console.log("switchWorkspace newWs", newWs);
if (this.allTabViews.size) { if (this.allTabViews.size) {
for (const tab of this.allTabViews.values()) { for (const tab of this.allTabViews.values()) {
this.contentView.removeChildView(tab);
tab?.destroy(); tab?.destroy();
} }
} }