mirror of
https://git.mirrors.martin98.com/https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-12 22:59:07 +08: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
@ -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…
x
Reference in New Issue
Block a user