forked from quickshell/quickshell
		
	core/lazyloader: fix incubator UAF in forceCompletion
The incubator was deleted via onIncubationCompleted before it was done working when completed via forceCompletion().
This commit is contained in:
		
							parent
							
								
									74f371850d
								
							
						
					
					
						commit
						2c0e46cedb
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -179,7 +179,9 @@ void LazyLoader::incubateIfReady(bool overrideReloadCheck) {
 | 
			
		|||
 | 
			
		||||
void LazyLoader::onIncubationCompleted() {
 | 
			
		||||
	this->setItem(this->incubator->object());
 | 
			
		||||
	delete this->incubator;
 | 
			
		||||
	// The incubator is not necessarily inert at the time of this callback,
 | 
			
		||||
	// so deleteLater is required.
 | 
			
		||||
	this->incubator->deleteLater();
 | 
			
		||||
	this->incubator = nullptr;
 | 
			
		||||
	this->targetLoading = false;
 | 
			
		||||
	emit this->loadingChanged();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue