fixed: make sure projectM is waiting on the condition variable before we signal it...
authorbobo1on1 <bobo1on1@svn>
Sat, 25 Sep 2010 22:29:03 +0000 (22:29 +0000)
committerbobo1on1 <bobo1on1@svn>
Sat, 25 Sep 2010 22:29:03 +0000 (22:29 +0000)
(cherry picked from commit b4370bd490f88ed37afc2e3c588eba87ae2a0cd0)

space monster

(cherry picked from commit 91a1c6f666406cf3ea5929f3b84eeb236f76bb35)

git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/Dharma@34186 568bbfeb-2a22-0410-94d2-cc84cf5bfa90

xbmc/visualizations/XBMCProjectM/libprojectM/projectM.cpp

index 192cb7d..c9788b0 100644 (file)
@@ -82,9 +82,12 @@ projectM::~projectM()
 {
 
  #ifdef USE_THREADS
+       pthread_mutex_lock( &mutex );
        running = false;
        pthread_cond_signal(&condition);
+       pthread_mutex_unlock( &mutex );
        pthread_join(thread, NULL);
+
        pthread_cond_destroy(&condition);
        pthread_mutex_destroy( &mutex );
 #endif