Skip to content

Commit 6ef09cc

Browse files
author
Paul Harrison
committed
MetadataImageDownload: fix Coverity ID 700237 Unchecked return value
In MetadataImageDownload::run(): Value returned from a function is not checked for errors before being used
1 parent 10c80db commit 6ef09cc

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

mythtv/libs/libmythmetadata/metadataimagedownload.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,17 @@ void MetadataImageDownload::run()
8282

8383
bool exists = QFile::exists(sFilename);
8484
if (!exists && !thumb->url.isEmpty())
85-
GetMythDownloadManager()->download(thumb->url, sFilename);
85+
{
86+
if (!GetMythDownloadManager()->download(thumb->url, sFilename))
87+
{
88+
LOG(VB_GENERAL, LOG_ERR,
89+
QString("MetadataImageDownload: failed to download thumbnail from: %1")
90+
.arg(thumb->url));
91+
92+
delete thumb;
93+
continue;
94+
}
95+
}
8696

8797
// inform parent we have thumbnail ready for it
8898
if (QFile::exists(sFilename) && m_parent)

0 commit comments

Comments
 (0)