Fix list::remove when trying to remove first element of the list (SIGSEGV)
This commit is contained in:
@ -141,6 +141,8 @@ impl ThreadManager {
|
||||
let old_status = machine.interrupt.set_status(InterruptStatus::InterruptOff);
|
||||
self.g_thread_to_be_destroyed = Option::Some(Rc::clone(&thread));
|
||||
self.g_alive.remove(Rc::clone(&thread));
|
||||
#[cfg(debug_assertions)]
|
||||
println!("Sleeping thread {}", thread.borrow().get_name());
|
||||
// g_objets_addrs->removeObject(self.thread) // a ajouté plus tard
|
||||
self.thread_sleep(machine, Rc::clone(&thread));
|
||||
machine.interrupt.set_status(old_status);
|
||||
|
Reference in New Issue
Block a user