forked from quickshell/quickshell
		
	core/menu: disconnect menu before unref when changed
This commit is contained in:
		
							parent
							
								
									08966f91c5
								
							
						
					
					
						commit
						c57ac4b1f2
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -71,8 +71,8 @@ void QsMenuOpener::setMenu(QsMenuHandle* menu) {
 | 
				
			||||||
		QObject::disconnect(this->mMenu, nullptr, this, nullptr);
 | 
							QObject::disconnect(this->mMenu, nullptr, this, nullptr);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (this->mMenu->menu()) {
 | 
							if (this->mMenu->menu()) {
 | 
				
			||||||
			this->mMenu->menu()->unref();
 | 
					 | 
				
			||||||
			QObject::disconnect(this->mMenu->menu(), nullptr, this, nullptr);
 | 
								QObject::disconnect(this->mMenu->menu(), nullptr, this, nullptr);
 | 
				
			||||||
 | 
								this->mMenu->menu()->unref();
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		this->mMenu->unrefHandle();
 | 
							this->mMenu->unrefHandle();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue