mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00: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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user