Index: /trunk/Ohana/src/opihi/pcontrol/MachineOps.c
===================================================================
--- /trunk/Ohana/src/opihi/pcontrol/MachineOps.c	(revision 26411)
+++ /trunk/Ohana/src/opihi/pcontrol/MachineOps.c	(revision 26412)
@@ -94,4 +94,5 @@
   // machine = host[0].machine;
   machine = FindMachineByName (host[0].hostname);
+  if (machine == NULL) return (FALSE);
 
   machine[0].Nhosts --;
@@ -110,7 +111,7 @@
   // find machine matching the real host name
   machine = FindMachineByName (host[0].hostname); // Can this fail?
-  ASSERT (machine, "cannot find machine associated with host") 
-    machine[0].NjobsRealhost ++;
-
+  ASSERT (machine, "cannot find machine associated with host");
+  machine[0].NjobsRealhost ++;
+  
   // skip jobs that do not have a targeted host
   if (job[0].hostname == NULL) {
@@ -125,6 +126,6 @@
   // find machine matching the want host name (these are running on an unwanted host)
   machine = FindMachineByName (job[0].hostname); // Can this fail?
-  ASSERT (machine, "cannot find machine associated with host") 
-    machine[0].NjobsWanthost ++;
+  if (machine == NULL) return (TRUE);
+  machine[0].NjobsWanthost ++;
   
   return (TRUE);
@@ -137,6 +138,6 @@
   // find machine matching the real host name
   machine = FindMachineByName (host[0].hostname); // Can this fail?
-  ASSERT (machine, "cannot find machine associated with host") 
-    machine[0].NjobsRealhost --;
+  ASSERT (machine, "cannot find machine associated with host");
+  machine[0].NjobsRealhost --;
 
   // skip jobs that do not have a targeted host
@@ -152,6 +153,6 @@
   // find machine matching the want host name
   machine = FindMachineByName (job[0].hostname); // Can this fail?
-  ASSERT (machine, "cannot find machine associated with host") 
-    machine[0].NjobsWanthost --;
+  if (machine == NULL) return (TRUE);
+  machine[0].NjobsWanthost --;
   
   return (TRUE);
@@ -177,4 +178,5 @@
 
   machine = FindMachineByName (job[0].hostname);
+  if (machine == NULL) return (TRUE);
   // fprintf (stderr, "wanthost: %s, Ntotal: %d, Nmax: %d\n", job[0].hostname, machine[0].NjobsWanthost + machine[0].NjobsRealhost, machine[0].Nhosts + MAX_UNWANTED_HOST_JOBS);
   // if (machine[0].NjobsWanthost + machine[0].NjobsRealhost >= machine[0].Nhosts + MAX_UNWANTED_HOST_JOBS) {
