Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 1281)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 1282)
@@ -10,4 +10,8 @@
    * macros/CT1Hillas.C:
      - changed to the new Hillas classes
+
+   * macros/readCT1.C:
+     - fixed a bug causing readCT1.C to crash when reading the first event 
+       being a pedestal event
 
 
Index: /trunk/MagicSoft/Mars/macros/readCT1.C
===================================================================
--- /trunk/MagicSoft/Mars/macros/readCT1.C	(revision 1281)
+++ /trunk/MagicSoft/Mars/macros/readCT1.C	(revision 1282)
@@ -36,5 +36,5 @@
     plist.AddToList(&tlist);
 
-    MCT1ReadAscii read("/home/tbretz/data/CT1_97_off1.dat");
+    MCT1ReadAscii read("/home/tbretz/data/CT1_97_on1.dat");
     MClone        clone("MCerPhotEvt");
     MImgCleanStd  clean;
@@ -60,7 +60,12 @@
         cout << "Event #" << icount++ << endl;
 
-        display.DrawPhotNum((MCerPhotEvt*)clone.GetClone());
+        MCerPhotEvt *evt = (MCerPhotEvt*)clone.GetClone();
+
+        if (!evt)
+            continue;
+
+        display.DrawPhotNum(evt);
         gClient->HandleInput();
-        if(getchar()=='q')
+        if (getchar()=='q')
             break;
 
@@ -70,5 +75,5 @@
 
         gClient->HandleInput();
-        if(getchar()=='q')
+        if (getchar()=='q')
             break;
     } 
