Skip to content

Commit

Permalink
Fixing second reported bug in xbmc#13574 - apparently gcc overoptimiz…
Browse files Browse the repository at this point in the history
…es critsections/checks.
  • Loading branch information
George Yunaev committed Dec 25, 2012
1 parent 5e98e17 commit a6058c0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion xbmc/music/karaoke/karaokelyricsmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,15 @@ bool CKaraokeLyricsManager::Start(const CStdString & strSongPath)

void CKaraokeLyricsManager::Stop()
{
CSingleLock lock (m_CritSection);
m_CritSection.lock();

m_karaokeSongPlaying = false;

if ( !m_Lyrics )
{
m_CritSection.unlock();
return;
}

// Clean up and close karaoke window when stopping
CGUIWindowKaraokeLyrics *window = (CGUIWindowKaraokeLyrics*) g_windowManager.GetWindow(WINDOW_KARAOKELYRICS);
Expand All @@ -129,6 +132,8 @@ void CKaraokeLyricsManager::Stop()
m_Lyrics->Shutdown();
delete m_Lyrics;
m_Lyrics = 0;

m_CritSection.unlock();
}


Expand Down

0 comments on commit a6058c0

Please sign in to comment.