Skip to content

Commit

Permalink
Fix segfault in manual record when there are no recordable channels d…
Browse files Browse the repository at this point in the history
…efined.
  • Loading branch information
daniel-kristjansson committed May 27, 2012
1 parent 186c4cb commit bd3144a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mythtv/programs/mythfrontend/manualschedule.cpp
Expand Up @@ -200,6 +200,12 @@ void ManualSchedule::recordClicked(void)
QDateTime endts = m_startDateTime
.addSecs(max(m_durationSpin->GetIntValue() * 60, 60));

if (m_channelList->GetCurrentPos() >= m_chanids.size())
{
LOG(VB_GENERAL, LOG_ERR, "Channel out of range.");
return; // this can happen if there are no channels..
}

ProgramInfo p(m_titleEdit->GetText().trimmed(),
m_chanids[m_channelList->GetCurrentPos()],
m_startDateTime, endts);
Expand Down

0 comments on commit bd3144a

Please sign in to comment.