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 21b78adfee
commit 14f8ed8dd2

View File

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