   SDL_WaitThread invalid handle??
  Is there anyway to check and see if an SDL_Thread is still running? I'm writing a video player that uses threads. The stop() function uses SDL_WaitThread to make sure all the buffering threads and whatnot are stopped. The problem occurs if a person calls the stop() function twice in a row. Since no threads are running after the 1st call, the second call returns with an "An invalid handle was specified" error with the debugger pointing at the SDL_WaitThread line.Here's my stop method:bool VideoPlayer::stop(){isPlaying = false;isBuffering = false;SDL_WaitThread(bufferer, NULL);SDL_WaitThread(player, NULL);pCodec->seekTo(0);clearBuffer(&frontBuffer);clearBuffer(&backBuffer);pDisplay->clearScreen();return true;}Here is how I created my threadsbool VideoPlayer::play(video::PlayMode pMode){if (!isPlaying){playMode = pMode;isBuffering = true;isPlaying = true;bufferer = SDL_CreateThread(buffer_thread, this);player = SDL_CreateThread(play_thread, this);return true;}return false;}Any ideas??   
  The SDL Manual isn't very clear about this. But it seems that if you try to get the id of a thread that's already terminated , SDL_GetThreadID() will return 0. Use this to check whether they've terminated or not...   