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 21b422cda9
commit 9b3d0d73aa

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());
}
//==============================================================================