Permalink
Browse files

epg: fix possible loop and deadlock when updating the epg async

  • Loading branch information...
1 parent aa45708 commit f8dbf1fce7a6931d79b70321364cac8fac780ac0 Lars Op den Kamp committed Jul 11, 2012
Showing with 1 addition and 4 deletions.
  1. +1 −4 xbmc/pvr/windows/GUIWindowPVRGuide.cpp
@@ -54,13 +54,11 @@ CGUIWindowPVRGuide::~CGUIWindowPVRGuide(void)
void CGUIWindowPVRGuide::UnregisterObservers(void)
{
- CSingleLock lock(m_critSection);
g_EpgContainer.UnregisterObserver(this);
}
void CGUIWindowPVRGuide::ResetObservers(void)
{
- CSingleLock lock(m_critSection);
g_EpgContainer.RegisterObserver(this);
}
@@ -214,6 +212,7 @@ void CGUIWindowPVRGuide::UpdateViewTimeline(void)
if (m_bUpdateRequired || m_cachedTimeline->IsEmpty())
{
+ m_bUpdateRequired = false;
CPVRChannel CurrentChannel;
bool bGotCurrentChannel = g_PVRManager.GetCurrentChannel(CurrentChannel);
bool bRadio = bGotCurrentChannel ? CurrentChannel.IsRadio() : false;
@@ -254,8 +253,6 @@ void CGUIWindowPVRGuide::UpdateData(void)
CSingleLock lock(m_critSection);
CLog::Log(LOGDEBUG, "CGUIWindowPVRGuide - %s - update window '%s'. set view to %d", __FUNCTION__, GetName(), m_iControlList);
- g_EpgContainer.RegisterObserver(this);
-
/* lock the graphics context while updating */
CSingleLock graphicsLock(g_graphicsContext);
m_parent->m_viewControl.Clear();

0 comments on commit f8dbf1f

Please sign in to comment.