Skip to content

Commit

Permalink
Fix Coverity 1023878, 700230, and 700229.
Browse files Browse the repository at this point in the history
  • Loading branch information
stichnot committed May 30, 2013
1 parent be0385d commit d4e9323
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions mythtv/libs/libmyth/programinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3890,14 +3890,12 @@ MarkTypes ProgramInfo::QueryAverageAspectRatio(void ) const
query.bindValue(":ASPECTSTART", MARK_ASPECT_4_3); // 11
query.bindValue(":ASPECTEND", MARK_ASPECT_CUSTOM); // 14

if (!query.exec())
if (!query.exec() || !query.next())
{
MythDB::DBError("QueryAverageAspectRatio", query);
return MARK_UNSET;
}

query.next();

return static_cast<MarkTypes>(query.value(0).toInt());
}

Expand Down Expand Up @@ -3938,7 +3936,11 @@ void ProgramInfo::SaveVideoProperties(uint mask, uint vid_flags)
query.bindValue(":FLAGS", vid_flags);
query.bindValue(":CHANID", chanid);
query.bindValue(":STARTTIME", startts);
query.exec();
if (!query.exec())
{
MythDB::DBError("SaveVideoProperties", query);
return;
}

uint videoproperties = GetVideoProperties();
videoproperties &= ~mask;
Expand Down Expand Up @@ -4000,7 +4002,11 @@ void ProgramInfo::SaveSeasonEpisode(uint seas, uint ep)
query.bindValue(":CHANID", chanid);
query.bindValue(":STARTTIME", recstartts);
query.bindValue(":RECORDID", recordid);
query.exec();
if (!query.exec())
{
MythDB::DBError("SaveSeasonEpisode", query);
return;
}

SendUpdateEvent();
}
Expand Down

0 comments on commit d4e9323

Please sign in to comment.