@@ -339,15 +339,15 @@ } void Jim_ReapDetachedPids(struct WaitInfoTable *table) { + struct WaitInfo *waitPtr; + int count; + if (!table) { return; } - struct WaitInfo *waitPtr; - int count; - for (waitPtr = table->info, count = table->used; count > 0; waitPtr++, count--) { if (waitPtr->flags & WI_DETACHED) { int status; int pid = waitpid(waitPtr->pid, &status, WNOHANG);