Properly destroy fade thread
This commit is contained in:
		
							parent
							
								
									abd59be30d
								
							
						
					
					
						commit
						6a85699e11
					
				
					 1 changed files with 7 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -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()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue