Skip to content

Commit

Permalink
DataDirectProcessor: Fix Coverity ID 700255 Unchecked return value
Browse files Browse the repository at this point in the history
In DataDirectProcessor::GrabData(): Check the data file opened OK.
  • Loading branch information
Paul Harrison committed Jun 24, 2013
1 parent f8e3b08 commit 24c86d3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion mythtv/libs/libmythtv/datadirect.cpp
Expand Up @@ -1186,7 +1186,13 @@ bool DataDirectProcessor::GrabData(const QDateTime &pstartDate,
}

QFile file(inputfile);
file.open(QIODevice::ReadOnly);

if (!file.open(QIODevice::ReadOnly))
{
LOG(VB_GENERAL, LOG_ERR, LOC + QString("Failed to open file: %1").arg(inputfile));
return false;
}

QByteArray data = file.readAll();
file.close();

Expand Down

0 comments on commit 24c86d3

Please sign in to comment.