Index: /trunk/ippTools/src/stacktool.c
===================================================================
--- /trunk/ippTools/src/stacktool.c	(revision 12051)
+++ /trunk/ippTools/src/stacktool.c	(revision 12052)
@@ -183,4 +183,13 @@
     psMetadataItem *item = NULL;
     while ((item = psListGetAndIncrement(iter))) {
+        // if the value is NULL this is probably the first pass through the
+        // loop and -warp_id was not specified at all
+        if (!item->data.V) {
+            if (!psDBRollback(config->dbh)) {
+                psError(PS_ERR_UNKNOWN, false, "database error");
+            }
+            psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -warp_id");
+            return false;
+        }
         if (!stackInputSkyfileInsert(config->dbh, run->stack_id, atoi((char *)item->data.V))) {
             if (!psDBRollback(config->dbh)) {
