mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 20:51:12 -06:00 
			
		
		
		
	Fix issue that the slice button is still disabled after a tick is deleted (#2308)
Fix an UAF which causes the slice button being disabled after a tick is deleted
This commit is contained in:
		
							parent
							
								
									85e24e62fa
								
							
						
					
					
						commit
						8e70081879
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -405,8 +405,9 @@ void IMSlider::add_code_as_tick(Type type, int selected_extruder) | |||
| } | ||||
| 
 | ||||
| void IMSlider::delete_tick(const TickCode& tick) { | ||||
|     Type t = tick.type; // Avoid Use-After-Free issue, which resets the tick.type to 0
 | ||||
|     m_ticks.ticks.erase(tick); | ||||
|     post_ticks_changed_event(tick.type); | ||||
|     post_ticks_changed_event(t); | ||||
| } | ||||
| 
 | ||||
| bool IMSlider::check_ticks_changed_event(Type type) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Noisyfox
						Noisyfox