Do not loop if the next hook is null

This commit is contained in:
Alex 2023-03-27 02:50:22 +03:00
parent a09790e4f2
commit fe64c55afc
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD

View File

@ -45,7 +45,7 @@ namespace Driver
for (size_t j = 0; j < sizeof(drv.InterruptHook) / sizeof(drv.InterruptHook[0]); j++)
{
if (!drv.InterruptHook[j])
continue;
break;
delete drv.InterruptHook[j], drv.InterruptHook[j] = nullptr;
}
if (drv.MemTrk)
@ -70,7 +70,7 @@ namespace Driver
for (size_t i = 0; i < sizeof(drv.InterruptHook) / sizeof(drv.InterruptHook[0]); i++)
{
if (!drv.InterruptHook[i])
continue;
break;
delete drv.InterruptHook[i], drv.InterruptHook[i] = nullptr;
}
delete drv.MemTrk, drv.MemTrk = nullptr;