Fix a stupid segfault caused by dereferencing a NULL ptr.
 -Erik
diff --git a/hush.c b/hush.c
index a5f634b..1cb5f39 100644
--- a/hush.c
+++ b/hush.c
@@ -1162,6 +1162,8 @@
 				remove_bg_job(pi);
 			}
 		} else {
+			if(pi==NULL)
+				break;
 			/* child stopped */
 			pi->stopped_progs++;
 			pi->progs[prognum].is_stopped = 1;
diff --git a/shell/hush.c b/shell/hush.c
index a5f634b..1cb5f39 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -1162,6 +1162,8 @@
 				remove_bg_job(pi);
 			}
 		} else {
+			if(pi==NULL)
+				break;
 			/* child stopped */
 			pi->stopped_progs++;
 			pi->progs[prognum].is_stopped = 1;