Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 7859)
+++ trunk/MagicSoft/Mars/Changelog	(revision 7860)
@@ -21,5 +21,6 @@
 
    * datacenter/macros/checkstardone.C, 
-     datacenter/macros/checkfileavail.C:
+     datacenter/macros/checkfileavail.C,
+     datacenter/macros/filldotraw.C:
      - fixed. res was still not correctly deleted
 
Index: trunk/MagicSoft/Mars/datacenter/macros/filldotraw.C
===================================================================
--- trunk/MagicSoft/Mars/datacenter/macros/filldotraw.C	(revision 7859)
+++ trunk/MagicSoft/Mars/datacenter/macros/filldotraw.C	(revision 7860)
@@ -88,5 +88,10 @@
 
     TSQLRow *row = res->Next();
-    if (!row)
+
+    TString rc = row ? (*row)[0] : "";
+
+    delete res;
+
+    if (rc.IsNull())
     {
         cout << "ERROR - No result from query: " << query << endl;
@@ -94,9 +99,5 @@
     }
 
-    Int_t rc = atoi((*row)[0]);
-
-    delete res;
-
-    return rc;
+    return rc.Atoi();
 }
 
