Fatal error if a Thread is destroyed while running

This commit is contained in:
Vinnie Falco
2013-08-17 20:54:14 -07:00
parent 6616cd86ef
commit d9b1b56c98

View File

@@ -40,7 +40,9 @@ Thread::~Thread()
To avoid this type of nastiness, always make sure you call stopThread() before or during To avoid this type of nastiness, always make sure you call stopThread() before or during
your subclass's destructor. your subclass's destructor.
*/ */
fatal_assert (! isThreadRunning()); check_precondition (! isThreadRunning());
stopThread ();
} }
//============================================================================== //==============================================================================