From 23cdc3e57cbaecb6f959222a931bb48cb25867f2 Mon Sep 17 00:00:00 2001 From: Gres Date: Sat, 11 Apr 2020 18:07:50 +0300 Subject: [PATCH] Fix update download error show --- src/service/updates.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/service/updates.cpp b/src/service/updates.cpp index 278f73f..a685538 100644 --- a/src/service/updates.cpp +++ b/src/service/updates.cpp @@ -187,9 +187,8 @@ void Loader::startDownloadUpdates(const QUrl &previous) else { const auto index = updateUrls_.indexOf(previous); SOFT_ASSERT(index != -1, return ); - if (index == updateUrls_.size() - 1) - return; - url = updateUrls_[index + 1]; + if (index + 1 < updateUrls_.size()) + url = updateUrls_[index + 1]; } if (url.isEmpty()) {