Permalink
Browse files

MetadataImageDownload: fix Coverity ID 700237 Unchecked return value

In MetadataImageDownload::run(): Value returned from a function is not
checked for errors before being used
  • Loading branch information...
Paul Harrison
Paul Harrison committed Jun 2, 2013
1 parent 10c80db commit 6ef09cc29b53bb49603d31a4f3dd13c77d43fb55
Showing with 11 additions and 1 deletion.
  1. +11 −1 mythtv/libs/libmythmetadata/metadataimagedownload.cpp
@@ -82,7 +82,17 @@ void MetadataImageDownload::run()
bool exists = QFile::exists(sFilename);
if (!exists && !thumb->url.isEmpty())
GetMythDownloadManager()->download(thumb->url, sFilename);
{
if (!GetMythDownloadManager()->download(thumb->url, sFilename))
{
LOG(VB_GENERAL, LOG_ERR,
QString("MetadataImageDownload: failed to download thumbnail from: %1")
.arg(thumb->url));
delete thumb;
continue;
}
}
// inform parent we have thumbnail ready for it
if (QFile::exists(sFilename) && m_parent)

0 comments on commit 6ef09cc

Please sign in to comment.