mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-11 16:46:16 +00:00
Fix thread handles
This commit is contained in:
@@ -347,7 +347,7 @@ class moved_marker
|
||||
bool was_moved_{false};
|
||||
};
|
||||
|
||||
class emulator_thread : ref_counted_object
|
||||
class emulator_thread : public ref_counted_object
|
||||
{
|
||||
public:
|
||||
emulator_thread(x64_emulator& emu)
|
||||
|
||||
@@ -3519,10 +3519,11 @@ namespace
|
||||
}
|
||||
|
||||
bool return_next_thread = thread_handle == NULL_HANDLE;
|
||||
for (const auto& t : c.proc.threads)
|
||||
for (auto& t : c.proc.threads)
|
||||
{
|
||||
if (return_next_thread && !t.second.is_terminated())
|
||||
{
|
||||
++t.second.ref_count;
|
||||
new_thread_handle.write(c.proc.threads.make_handle(t.first));
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user