Index: trunk/MagicSoft/Mars/mbase/MGList.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MGList.cc	(revision 8561)
+++ trunk/MagicSoft/Mars/mbase/MGList.cc	(revision 8562)
@@ -88,5 +88,6 @@
         //
         Remove(obj);
-        gClient->FreePicture((TGPicture*)obj);
+        if (gClient)
+            gClient->FreePicture((TGPicture*)obj);
     }
 }
@@ -257,4 +258,7 @@
 const TGPicture *MGList::GetPicture(const char *name)
 {
+    if (!gClient)
+        return NULL;
+
     TGPicture *pic = const_cast<TGPicture*>(gClient->GetPicture(name));
     AddPicture(pic, name);
@@ -276,4 +280,7 @@
 const TGPicture *MGList::GetPicture(const char *name, Int_t width, Int_t height)
 {
+    if (!gClient)
+        return NULL;
+
     TGPicture *pic = const_cast<TGPicture*>(gClient->GetPicture(name, width, height));
     AddPicture(pic, name);
