Fatal error in ~Thread if thread still running (undefined behavior)

This commit is contained in:
Vinnie Falco
2013-08-05 09:19:34 -07:00
parent 5e3548fc00
commit 0c00335627

View File

@@ -40,10 +40,7 @@ Thread::~Thread()
To avoid this type of nastiness, always make sure you call stopThread() before or during
your subclass's destructor.
*/
bassert (! isThreadRunning());
if (isThreadRunning())
FatalError ("Thread is still running", __FILE__, __LINE__);
fatal_require (! isThreadRunning());
}
//==============================================================================