opdenkamp/xbmc — Issue #347: crash at livetv channel switching with missing EPG data
Author: jbraat
Created: 2011-11-27 15:16:14+00:00
State: open

Hello,

There is a crash when switching to channel without EPG data (using up/down on the remote)

Issue is caused, i think, by recent changes in xbmc/pvr/PVRGUIInfo.cpp

This fixed it for me:

void CPVRGUIInfo::UpdatePlayingTag(void)
{
CSingleLock lock(m_critSection);

CPVRChannel currentChannel;
CPVRRecording recording;
if (g_PVRManager.GetCurrentChannel(¤tChannel))
{
if (!m_playingEpgTag || !m_playingEpgTag->IsActive() ||
(*m_playingEpgTag->ChannelTag() != currentChannel))
{
if (m_playingEpgTag)
delete m_playingEpgTag;
+ m_playingEpgTag = NULL;

const CEpgInfoTag *newTag = currentChannel.GetEPGNow();
if (newTag)
m_playingEpgTag = new CEpgInfoTag(*newTag);

m_iDuration = m_playingEpgTag ? m_playingEpgTag->GetDuration() * 1000 : 0;
g_PVRManager.UpdateCurrentFile();
}
}
else if (g_PVRClients->GetPlayingRecording(&recording))
{
if (m_playingEpgTag)
delete m_playingEpgTag;
m_playingEpgTag = NULL;
m_iDuration = recording.GetDuration() * 1000;
}
}

Thanks.