Skip to content

Commit d07b55e

Browse files
author
Requiem
committed
chore: small safeguard when querying events
1 parent 9a86d77 commit d07b55e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/vmaware.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6374,7 +6374,10 @@ struct VM {
63746374
break;
63756375
}
63766376

6377-
if (returned == 0) continue;
6377+
if (returned == 0 || hEvents[0] == nullptr) {
6378+
if (hEvents[0]) { EvtClose(hEvents[0]); hEvents[0] = nullptr; }
6379+
continue;
6380+
}
63786381

63796382
DWORD bufUsed = 0;
63806383
DWORD bufProps = 0;

0 commit comments

Comments
 (0)