Fix thread deletion

This commit is contained in:
momo5502
2025-06-01 13:57:14 +02:00
parent da658e5178
commit 009961620b
4 changed files with 32 additions and 1 deletions

View File

@@ -15,7 +15,7 @@ namespace syscalls
if (h.value.type == handle_types::thread)
{
const auto* t = c.proc.threads.get(h);
if (t == c.proc.active_thread && t->ref_count == 1)
if (t && t->ref_count == 1)
{
// TODO: Better handle ref counting
return STATUS_SUCCESS;