Make sure to remove thread local data only if we have destructor.
This commit is contained in:
parent
911ff7eade
commit
d9e18ada39
@ -181,8 +181,8 @@ fn fetch_tls_dtor(
|
||||
{
|
||||
match data.entry(thread_id) {
|
||||
Entry::Occupied(entry) => {
|
||||
let data_scalar = entry.remove();
|
||||
if let Some(dtor) = dtor {
|
||||
let data_scalar = entry.remove();
|
||||
let ret = Some((*dtor, data_scalar, key));
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user