Lock the context when dropping nodes
This commit is contained in:
parent
4ac10c96db
commit
e5a17ee232
|
|
@ -1209,6 +1209,9 @@ where
|
|||
|
||||
impl Drop for Node {
|
||||
fn drop(&mut self) {
|
||||
// fini functions are not thread safe so lock the context.
|
||||
let _ctx_handle = self.context.context_handle.lock().unwrap();
|
||||
|
||||
for s in &mut self.subs {
|
||||
s.destroy(&mut self.node_handle);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue