Skip to content

Commit

Permalink
fix NPE in quick open
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Jan 5, 2018
1 parent a71f69e commit c4065a8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/vs/workbench/parts/search/common/queryBuilder.ts
Expand Up @@ -44,7 +44,7 @@ export class QueryBuilder {
return this.query(QueryType.File, null, folderResources, options);
}

private query(type: QueryType, contentPattern: IPatternInfo, folderResources?: uri[], options: IQueryOptions = {}): ISearchQuery {
private query(type: QueryType, contentPattern?: IPatternInfo, folderResources?: uri[], options: IQueryOptions = {}): ISearchQuery {
let { searchPaths, pattern: includePattern } = this.parseSearchPaths(options.includePattern);
let excludePattern = this.parseExcludePattern(options.excludePattern);

Expand All @@ -71,7 +71,9 @@ export class QueryBuilder {

const ignoreSymlinks = !this.configurationService.getValue<ISearchConfiguration>().search.followSymlinks;

this.resolveSmartCaseToCaseSensitive(contentPattern);
if (contentPattern) {
this.resolveSmartCaseToCaseSensitive(contentPattern);
}

const query = <ISearchQuery>{
type,
Expand Down

0 comments on commit c4065a8

Please sign in to comment.