Properly destroy fade thread

This commit is contained in:
Jonas Kulla 2013-09-04 17:53:12 +02:00
parent abd59be30d
commit 6a85699e11
1 changed files with 7 additions and 0 deletions

View File

@ -180,13 +180,20 @@ private:
void terminateFade()
{
if (!fading)
{
delete fadeData.thread;
fadeData.thread = 0;
return;
}
/* Tell our thread to wrap up and wait for it */
fadeData.terminate = true;
fadeData.thread->wait();
fading = false;
delete fadeData.thread;
fadeData.thread = 0;
}
void stopPriv()