From 7d5ab68f5085d66e9286841c5442a284d3d2aa0f Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sat, 16 Apr 2016 12:37:23 +0800 Subject: [PATCH] Fix Coverity Scan cid 143911. `filesCount()` could return a negative value. --- src/gui/torrentcontentmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/torrentcontentmodel.cpp b/src/gui/torrentcontentmodel.cpp index 6eb69f57a..7324532de 100644 --- a/src/gui/torrentcontentmodel.cpp +++ b/src/gui/torrentcontentmodel.cpp @@ -285,7 +285,7 @@ void TorrentContentModel::clear() void TorrentContentModel::setupModelData(const BitTorrent::TorrentInfo &info) { qDebug("setup model data called"); - if (info.filesCount() == 0) + if (info.filesCount() <= 0) return; emit layoutAboutToBeChanged();