Index: branches/czw_branch/20110406/ippTools/src/laptool.c
===================================================================
--- branches/czw_branch/20110406/ippTools/src/laptool.c	(revision 31429)
+++ branches/czw_branch/20110406/ippTools/src/laptool.c	(revision 31430)
@@ -460,15 +460,17 @@
   if (rows) {
     // We're done with these exposures now, so mark them as inactive.
-    if ((strcmp(state,"drop") == 0)||
-	(strcmp(state,"full") == 0)) {
-      values = psMetadataAlloc();
-      psMetadataAddBool(values, PS_LIST_TAIL, "active", 0, "", false);
-      long exps = psDBUpdateRows(config->dbh, "lapExp", where, values);
-
-      if (exps) {
-	return(true);
-      }
-      else {
-	return(true); // We shouldn't really fail if we didn't change anything. Maybe there's nothing to change.
+    if (state) {
+      if ((strcmp(state,"drop") == 0)||
+	  (strcmp(state,"full") == 0)) {
+	values = psMetadataAlloc();
+	psMetadataAddBool(values, PS_LIST_TAIL, "active", 0, "", false);
+	long exps = psDBUpdateRows(config->dbh, "lapExp", where, values);
+	
+	if (exps) {
+	  return(true);
+	}
+	else {
+	  return(true); // We shouldn't really fail if we didn't change anything. Maybe there's nothing to change.
+	}
       }
     }
