Don't create filename entries without actual matches.

Added an early return in GrepWindow::_OnReportResult(BMessage* message)
in case the report message does not contain matches.

Signed-off-by: Stephan Aßmus <[email protected]>
This commit is contained in:
Jürgen Wall
2012-10-03 14:25:30 +02:00
committed by Stephan Aßmus
parent e8a905efef
commit 2f5c0cbab1
+4
View File
@@ -1049,6 +1049,10 @@ GrepWindow::_OnReportResult(BMessage* message)
// also reported (count == 0).
item = fSearchResults->RemoveResults(ref, count == 0);
}
if (count == 0)
return;
if (item == NULL) {
item = new ResultItem(ref);
fSearchResults->AddItem(item);