more error checking

This commit is contained in:
Akash Mozumdar 2018-07-19 14:34:34 -04:00
parent a7a3379050
commit 7df8e40fc9

View File

@ -52,6 +52,7 @@ TextThread *HookManager::FindSingle(DWORD number)
void HookManager::SetCurrent(TextThread *it)
{
HM_LOCK;
if (it == nullptr) return;
current->Status() &= ~CURRENT_SELECT;
current = it;
it->Status() |= CURRENT_SELECT;