Index: trunk/ippTools/src/dettool.c
===================================================================
--- trunk/ippTools/src/dettool.c	(revision 9735)
+++ trunk/ippTools/src/dettool.c	(revision 9753)
@@ -795,10 +795,15 @@
     PS_ASSERT_PTR_NON_NULL(config, false);
 
-//    psArray *runs = detRunSelectRowObjects(config->dbh, config->where, 0);
     // XXX fix the hard coding of the table name
     psArray *runs = psDBSelectRows(config->dbh, "detRun", config->where, 0);
     if (!runs) {
+        psError(PS_ERR_UNKNOWN, false, "database error");
+        return false;
+    }
+
+    if (!psArrayLength(runs)) {
         psError(PS_ERR_UNKNOWN, false, "no detRun rows found");
-        return false;
+        psFree(runs);
+        return true;
     }
 
