Skip to content

Commit 80ee4aa

Browse files
committed
Fix crash on iconPath access
Fixes microsoft#61333
1 parent f99819f commit 80ee4aa

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/vs/workbench/parts/webview/electron-browser/webviewEditorInputFactory.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ export class WebviewEditorInputFactory implements IEditorInputFactory {
7272
return this._webviewService.reviveWebview(data.viewType, data.id, data.title, iconPath, data.state, data.options, extensionLocation);
7373
}
7474
}
75-
function reviveIconPath(data: SerializedIconPath) {
75+
function reviveIconPath(data: SerializedIconPath | undefined) {
76+
if (!data) {
77+
return undefined;
78+
}
79+
7680
const light = reviveUri(data.light);
7781
const dark = reviveUri(data.dark);
7882
return light && dark ? { light, dark } : undefined;

0 commit comments

Comments
 (0)