From 3c19842c7f4faff87613ce55c650f15144a15e6c Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Tue, 10 Jul 2018 10:10:04 -0700 Subject: [PATCH] Fix #53840 - work around unlikely NPE --- .../workbench/parts/preferences/browser/settingsEditor2.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/preferences/browser/settingsEditor2.ts b/src/vs/workbench/parts/preferences/browser/settingsEditor2.ts index 9e11c49536a..a033f68b8a5 100644 --- a/src/vs/workbench/parts/preferences/browser/settingsEditor2.ts +++ b/src/vs/workbench/parts/preferences/browser/settingsEditor2.ts @@ -693,7 +693,10 @@ export class SettingsEditor2 extends BaseEditor { // Count unique results const counts = {}; const filterResult = results[SearchResultIdx.Local]; - counts['filterResult'] = filterResult.filterMatches.length; + if (filterResult) { + counts['filterResult'] = filterResult.filterMatches.length; + } + if (nlpResult) { counts['nlpResult'] = nlpResult.filterMatches.length; } -- GitLab