From e2b140b8ddb315ecc2ece55ce3dd54a3ea12817f Mon Sep 17 00:00:00 2001 From: nmariusp <107675943+nmariusp@users.noreply.github.com> Date: Thu, 14 Jul 2022 08:19:38 +0300 Subject: [PATCH] Remove meaningless checking for nullptr Fix PVS-Studio issue "rss_autodownloader.cpp:111: warning: V668 There is no sense in testing the 'm_fileStorage' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error". PR #17347. --- src/base/rss/rss_autodownloader.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/base/rss/rss_autodownloader.cpp b/src/base/rss/rss_autodownloader.cpp index a0c0624ff..bf50222ef 100644 --- a/src/base/rss/rss_autodownloader.cpp +++ b/src/base/rss/rss_autodownloader.cpp @@ -108,8 +108,6 @@ AutoDownloader::AutoDownloader() m_instance = this; m_fileStorage = new AsyncFileStorage(specialFolderLocation(SpecialFolder::Config) / Path(CONF_FOLDER_NAME)); - if (!m_fileStorage) - throw RuntimeError(tr("Directory for RSS AutoDownloader data is unavailable.")); m_fileStorage->moveToThread(m_ioThread); connect(m_ioThread, &QThread::finished, m_fileStorage, &AsyncFileStorage::deleteLater);