SOLR-7371: Fix NPE when scores are null

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1672402 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2015-04-09 15:49:12 +00:00
parent 32c78bc382
commit c400bde439
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ public class DocSlice extends DocSetBase implements DocList {
this.scores=scores;
this.matches=matches;
this.maxScore=maxScore;
this.ramBytesUsed = BASE_RAM_BYTES_USED + RamUsageEstimator.sizeOf(docs) + RamUsageEstimator.sizeOf(scores);
this.ramBytesUsed = BASE_RAM_BYTES_USED + RamUsageEstimator.sizeOf(docs) + (scores != null ? RamUsageEstimator.sizeOf(scores) : 0);
}
@Override