Regres: Avoid dereferencing a nil on process timeout.

"ProcessState contains information about an exited process, available after a call to Wait or Run"

As ProcessState is only assigned after `Wait()` has completed, and this is run on another goroutine, it may be nil.
Check before using it.

Change-Id: I319f0703b3547186b53caca8d9d70bc5cd738d34
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43993
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Ben Clayton <bclayton@google.com>
diff --git a/tests/regres/shell/shell_unix.go b/tests/regres/shell/shell_unix.go
index 65fe46b..59fd599 100644
--- a/tests/regres/shell/shell_unix.go
+++ b/tests/regres/shell/shell_unix.go
@@ -106,7 +106,7 @@
 	case <-time.NewTimer(timeout).C:
 		c.Process.Signal(syscall.SIGINT)
 		time.Sleep(time.Second * 3)
-		if !c.ProcessState.Exited() {
+		if c.ProcessState == nil || !c.ProcessState.Exited() {
 			log.Printf("Process %v still has not exited, killing\n", c.Process.Pid)
 			syscall.Kill(-c.Process.Pid, syscall.SIGKILL)
 		}