Make sure to remove thread local data only if we have destructor.
This commit is contained in:
parent
911ff7eade
commit
d9e18ada39
1 changed files with 1 additions and 1 deletions
|
|
@ -181,8 +181,8 @@ impl<'tcx> TlsData<'tcx> {
|
|||
{
|
||||
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…
Add table
Add a link
Reference in a new issue