Permalink
Browse files

RSSEditPopup: Fix Coverity ID 1037043 Unchecked return value

In RSSEditPopup::slotSave(): check the download completed OK
  • Loading branch information...
Paul Harrison
Paul Harrison committed Jun 23, 2013
1 parent b1798e0 commit a8fec681b6ae2464fa9df7699f386f5b9faa4e0f
Showing with 12 additions and 3 deletions.
  1. +12 −3 mythplugins/mythnetvision/mythnetvision/rsseditor.cpp
@@ -300,14 +300,23 @@ void RSSEditPopup::slotSave(QNetworkReply* reply)
filename = QString("%1/%2").arg(fileprefix).arg(rawFilename);
bool exists = QFile::exists(filename);
if (!exists)
GetMythDownloadManager()->download(thumbnailURL, filename);
if (!QFile::exists(filename))
{
if (!GetMythDownloadManager()->download(thumbnailURL, filename))
{
LOG(VB_GENERAL, LOG_ERR,
QString("RSSEditPopup: failed to download thumbnail from: %1")
.arg(thumbnailURL));
filename = "";
}
}
}
if (insertInDB(new RSSSite(title, filename, VIDEO_PODCAST, description, link,
author, download, MythDate::current())))
emit saving();
}
Close();
}

0 comments on commit a8fec68

Please sign in to comment.