Index: trunk/MagicSoft/Mars/mbase/MLog.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MLog.cc	(revision 988)
+++ trunk/MagicSoft/Mars/mbase/MLog.cc	(revision 989)
@@ -43,4 +43,5 @@
 #include "MLog.h"
 
+#include <stdlib.h>     // mkstempe
 #include <fstream.h>
 #include <TGListBox.h>
@@ -204,5 +205,5 @@
 void MLog::AllocateFile(const char *fname)
 {
-    fout = new ofstream(fname);
+    fout = fname ? new ofstream(fname) : new ofstream(mkstemp("logXXXXXX"));
     fOutAllocated = kTRUE;
 }
Index: trunk/MagicSoft/Mars/mbase/MLog.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MLog.h	(revision 988)
+++ trunk/MagicSoft/Mars/mbase/MLog.h	(revision 989)
@@ -5,8 +5,8 @@
 //#include "MAGIC.h"
 //#endif
+#ifndef ROOT_TObject
+#include <TObject.h>
+#endif
 
-#include <TObject.h>
-
-#include <stdio.h>     // tmpname
 #include <iostream.h>  // base classes for MLog
 
@@ -95,5 +95,5 @@
     }
 
-    void SetOutputFile(const char *f=tmpnam(NULL), int flag=-1)
+    void SetOutputFile(const char *f=NULL, int flag=-1)
     {
         //
@@ -121,5 +121,5 @@
         //
         if (!fout)
-            ReallocateFile(tmpnam(NULL));
+            ReallocateFile(NULL);
         return *fout;
     }
Index: trunk/MagicSoft/Mars/mmain/MMonteCarlo.cc
===================================================================
--- trunk/MagicSoft/Mars/mmain/MMonteCarlo.cc	(revision 988)
+++ trunk/MagicSoft/Mars/mmain/MMonteCarlo.cc	(revision 989)
@@ -85,7 +85,11 @@
     fRadioButton3 = new TGRadioButton(group, "Use a number of trigger conditions (1..n).");
 
-    fList->Add(fRadioButton1);
-    fList->Add(fRadioButton2);
-    fList->Add(fRadioButton3);
+    /*
+     FIXME: ~TGRadioButton fails with segfault in GetMainFrame
+
+     fList->Add(fRadioButton1);
+     fList->Add(fRadioButton2);
+     fList->Add(fRadioButton3);
+    */
 
     //
