mirror of
https://github.com/neoStudiosLCE/neoLegacy.git
synced 2026-08-20 09:57:09 +00:00
fix: add null check for TLS compression pointer
This commit is contained in:
parent
fd21c3bc0e
commit
4191b654b2
|
|
@ -51,6 +51,9 @@ void Compression::ReleaseThreadStorage()
|
||||||
Compression *Compression::getCompression()
|
Compression *Compression::getCompression()
|
||||||
{
|
{
|
||||||
const ThreadStorage *tls = static_cast<ThreadStorage *>(TlsGetValue(tlsIdx));
|
const ThreadStorage *tls = static_cast<ThreadStorage *>(TlsGetValue(tlsIdx));
|
||||||
|
if (!tls) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
return tls->compression;
|
return tls->compression;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue