Skip to content

Commit d9e18ad

Browse files
author
Vytautas Astrauskas
committed
Make sure to remove thread local data only if we have destructor.
1 parent 911ff7e commit d9e18ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shims/tls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ impl<'tcx> TlsData<'tcx> {
181181
{
182182
match data.entry(thread_id) {
183183
Entry::Occupied(entry) => {
184-
let data_scalar = entry.remove();
185184
if let Some(dtor) = dtor {
185+
let data_scalar = entry.remove();
186186
let ret = Some((*dtor, data_scalar, key));
187187
return ret;
188188
}

0 commit comments

Comments
 (0)