Permalink
Browse files

Fix Coverity 1023878, 700230, and 700229.

  • Loading branch information...
stichnot committed May 30, 2013
1 parent be0385d commit d4e9323e20ef5f13e524fb36928780d06e9813e6
Showing with 11 additions and 5 deletions.
  1. +11 −5 mythtv/libs/libmyth/programinfo.cpp
@@ -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());
}
@@ -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;
@@ -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();
}

0 comments on commit d4e9323

Please sign in to comment.