diff --git a/src/vs/editor/contrib/suggest/suggestWidget.ts b/src/vs/editor/contrib/suggest/suggestWidget.ts index cf433d3dc8a..de265df494f 100644 --- a/src/vs/editor/contrib/suggest/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/suggestWidget.ts @@ -176,7 +176,9 @@ class Renderer implements IRenderer { } disposeTemplate(templateData: ISuggestionTemplateData): void { - templateData.highlightedLabel.dispose(); + if (templateData.highlightedLabel) { + templateData.highlightedLabel.dispose(); + } templateData.disposables = dispose(templateData.disposables); } }