Index: trunk/Mars/mbase/MStatusArray.cc
===================================================================
--- trunk/Mars/mbase/MStatusArray.cc	(revision 14870)
+++ trunk/Mars/mbase/MStatusArray.cc	(revision 14888)
@@ -108,10 +108,8 @@
 #ifdef DEBUG
             cout << "Start Delete " << o << " " << o->GetName() << " " << o->ClassName() << endl;
-            ptr = o;
 #endif
             delete o;
 
 #ifdef DEBUG
-            ptr = 0;
             cout << "Done  Delete " << o<< endl;
 #endif
@@ -218,5 +216,5 @@
         {
 #ifdef DEBUG
-            cout << "MStatusArray::RecursiveRemove " << obj << " from TGraph " << g << endl;
+            gLog << all << "MStatusArray::RecursiveRemove " << obj << " from TGraph " << g << endl;
 #endif
 
@@ -227,8 +225,7 @@
             {
 #ifdef DEBUG
-                cout << "       SetHist(0)" << endl;
+                gLog << all << "       SetHist(0)" << endl;
 #endif
                 g->SetHistogram(0);
-                continue;
             }
 
@@ -240,8 +237,7 @@
             {
 #ifdef DEBUG
-                cout << "       SetFunc(0)" << endl;
+                gLog << all << "       SetFunc(0)" << endl;
 #endif
                 static_cast<MyGraph*>(g)->ResetListOfFunctions();
-                continue;
             }
         }
@@ -306,4 +302,5 @@
         SetCleanup(o);
 
+#if ROOT_VERSION_CODE < ROOT_VERSION(5,26,00)
     // Now delete the MARS object first because we have full control
     // of them
@@ -316,4 +313,5 @@
     while ((o=Next3()))
         while (!RecursiveDelete(dynamic_cast<TVirtualPad*>(o)));
+#endif
 
     // And delete all the rest
