From 1b39a479e9783705686ea45e777f6a521b83c12d Mon Sep 17 00:00:00 2001 From: Yury Melnichek Date: Sat, 18 Jun 2011 18:20:55 +0200 Subject: [PATCH] [search] If there are no slots for results remaining, finish early. --- search/query.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/search/query.cpp b/search/query.cpp index c889425bb6..8b1ac77043 100644 --- a/search/query.cpp +++ b/search/query.cpp @@ -176,6 +176,11 @@ void Query::Search(function const & f) return; FlushResults(f); + if (m_resultsRemaining == 0 || m_queryText.empty()) + { + f(Result(string(), string())); // Send last search result marker. + return; + } // Feature matching. FeatureProcessor featureProcessor(*this);