Index: trunk/ippTools/src/dettool.c
===================================================================
--- trunk/ippTools/src/dettool.c	(revision 7315)
+++ trunk/ippTools/src/dettool.c	(revision 7316)
@@ -1174,4 +1174,16 @@
    
     // det_id is required
+    // psString det_id is unused... it is only checked for to make sure it is
+    // in config->where
+    bool status = false;
+    psString det_id = psMetadataLookupStr(&status, config->args, "-det_id");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -det_id");
+        return false;
+    }
+    if (!det_id) {
+        psError(PS_ERR_UNKNOWN, true, "-det_id is required");
+        return false;
+    }
 
     psArray *masterImfiles =
@@ -1205,5 +1217,5 @@
     PS_ASSERT_PTR_NON_NULL(config, false);
     
-    // det_id is required
+    // XXX det_id is requried as a simplification
     bool status = false;
     psString det_id = psMetadataLookupStr(&status, config->args, "-det_id");
@@ -1212,7 +1224,10 @@
         return false;
     }
+    if (!det_id) {
+        psError(PS_ERR_UNKNOWN, true, "-det_id is required");
+        return false;
+    }
 
     // find all detNormalizedIImfile for det_id
-    // XXX det_id is requried as a simplification
     psArray *masterImfiles =
         detNormalizedImfileSelectRowObjects(config->dbh, config->where, 0);
