forked from quickshell/quickshell
		
	
							parent
							
								
									8be18c05ed
								
							
						
					
					
						commit
						20c3da01f1
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		| 
						 | 
					@ -492,7 +492,10 @@ void FileView::updatePath() {
 | 
				
			||||||
void FileView::updateWatchedFiles() {
 | 
					void FileView::updateWatchedFiles() {
 | 
				
			||||||
	// If inotify events are sent to the watcher after deletion and deleteLater
 | 
						// If inotify events are sent to the watcher after deletion and deleteLater
 | 
				
			||||||
	// isn't used, a use after free in the QML engine will occur.
 | 
						// isn't used, a use after free in the QML engine will occur.
 | 
				
			||||||
	if (this->watcher) this->watcher->deleteLater();
 | 
						if (this->watcher) {
 | 
				
			||||||
 | 
							this->watcher->deleteLater();
 | 
				
			||||||
 | 
							this->watcher = nullptr;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!this->targetPath.isEmpty() && this->bWatchChanges) {
 | 
						if (!this->targetPath.isEmpty() && this->bWatchChanges) {
 | 
				
			||||||
		qCDebug(logFileView) << "Creating watcher for" << this << "at" << this->targetPath;
 | 
							qCDebug(logFileView) << "Creating watcher for" << this << "at" << this->targetPath;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue