Permalink
Browse files

AE: possible segfault after suspend / resume (m_sink might be gone)

  • Loading branch information...
fritsch committed Mar 26, 2013
1 parent 6db72f9 commit c0e50094715d41da30d0a08140e7fd1c149c453b
Showing with 2 additions and 1 deletion.
  1. +2 −1 xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
@@ -1536,7 +1536,8 @@ inline void CSoftAE::ProcessSuspend()
*/
if (!m_isSuspended && (!m_playingStreams.empty() || !m_playing_sounds.empty()))
{
- m_reOpen = !m_sink->SoftResume() || m_reOpen; // sink returns false if it requires reinit (worthless with current implementation)
+ // the sink might still be not initialized after Resume of real suspend
+ m_reOpen = m_sink && (!m_sink->SoftResume() || m_reOpen); // sink returns false if it requires reinit (worthless with current implementation)
m_sinkIsSuspended = false; //sink processing data
m_softSuspend = false; //break suspend loop (under some conditions)
CLog::Log(LOGDEBUG, "Resumed the Sink");

0 comments on commit c0e5009

Please sign in to comment.