REST: Avoid Lucene crashes when searching for 0 documents

master
François-Xavier Thomas 8 years ago
parent 87ed516049
commit b9be3fef1d
No known key found for this signature in database
GPG Key ID: 64337406D2DD45CE
  1. 2
      libresonic-main/src/main/java/org/libresonic/player/service/SearchService.java

@ -159,6 +159,8 @@ public class SearchService {
int count = criteria.getCount(); int count = criteria.getCount();
result.setOffset(offset); result.setOffset(offset);
if (count <= 0) return result;
IndexReader reader = null; IndexReader reader = null;
try { try {
reader = createIndexReader(indexType); reader = createIndexReader(indexType);

Loading…
Cancel
Save