Index: trunk/ippTools/src/magictool.c
===================================================================
--- trunk/ippTools/src/magictool.c	(revision 30388)
+++ trunk/ippTools/src/magictool.c	(revision 30402)
@@ -890,8 +890,13 @@
         return false;
     }
-    psArray *output = NULL;
-    if (psArrayLength(magicRuns)) {
-        output = psArrayAllocEmpty(100);
-
+
+    if (!psArrayLength(magicRuns)) {
+        // no pending magicRuns nothing to do
+        psTrace("magictool", PS_LOG_INFO, "no rows found");
+        return true;
+    }
+    psArray *output = psArrayAllocEmpty(100);
+
+    {
         query = pxDataGet("magictool_toprocess_tree.sql");
         if (!query) {
