Slideshow reduce race condition when background loading picture.
authorulion <ulion2002@gmail.com>
Thu, 11 Apr 2013 04:16:02 +0000 (12:16 +0800)
committerulion <ulion2002@gmail.com>
Thu, 2 May 2013 11:42:14 +0000 (19:42 +0800)
xbmc/pictures/GUIWindowSlideShow.cpp

index 9b88ff7..ba32925 100644 (file)
@@ -499,6 +499,8 @@ void CGUIWindowSlideShow::Process(unsigned int currentTime, CDirtyRegionList &re
     return;
   }
 
+  CSingleLock lock(m_slideSection);
+
   if (!m_Image[m_iCurrentPic].IsLoaded() && !m_pBackgroundLoader->IsLoading())
   { // load first image
     CFileItemPtr item = m_slides->Get(m_iCurrentSlide);