diff --git a/Sandboxie/core/drv/thread.c b/Sandboxie/core/drv/thread.c index 3baebce5..1858a877 100644 --- a/Sandboxie/core/drv/thread.c +++ b/Sandboxie/core/drv/thread.c @@ -1104,9 +1104,9 @@ _FX ACCESS_MASK Thread_CheckObject_CommonEx( // If the calling process is sandboxed the later common check will do the blocking // - if (!proc || proc->bHostInject) { // caller is not sandboxed + if (!proc || (proc == PROCESS_TERMINATED) || proc->bHostInject) { // caller is not sandboxed - if (Process_Find(pid, NULL)) { // target is sandboxed - lock free check + if (pid != NULL && Process_Find(pid, NULL)) { // target is sandboxed - lock free check void* nbuf = 0; ULONG nlen = 0;