Index: trunk/MagicSoft/Mars/mmain/MStatusDisplay.cc
===================================================================
--- trunk/MagicSoft/Mars/mmain/MStatusDisplay.cc	(revision 2397)
+++ trunk/MagicSoft/Mars/mmain/MStatusDisplay.cc	(revision 2416)
@@ -75,4 +75,6 @@
 #include <TObjArray.h>            // TObjArray
 #include <TPostScript.h>          // TPostScript
+
+#include <TRint.h>                // gApplication, TRint::Class()
 #include <TInterpreter.h>         // gInterpreter
 
@@ -374,5 +376,7 @@
 
         // make it visible
-        gClient->ProcessEventsFor(fTab);
+        // FIXME: This is a workaround, because TApplication::Run is not thread safe against ProcessEvents
+        if (gApplication->InheritsFrom(TRint::Class()))
+            gClient->ProcessEventsFor(fTab);
     }
 
@@ -470,5 +474,7 @@
         return;
     fStatusBar->SetText(txt, 0);
-    gClient->ProcessEventsFor(fStatusBar);
+    // FIXME: This is a workaround, because TApplication::Run is not thread safe against ProcessEvents
+    if (gApplication->InheritsFrom(TRint::Class()))
+        gClient->ProcessEventsFor(fStatusBar);
 }
 
@@ -482,5 +488,7 @@
         return;
     fStatusBar->SetText(txt, 1);
-    gClient->ProcessEventsFor(fStatusBar);
+    // FIXME: This is a workaround, because TApplication::Run is not thread safe against ProcessEvents
+    if (gApplication->InheritsFrom(TRint::Class()))
+        gClient->ProcessEventsFor(fStatusBar);
 }
 
@@ -567,5 +575,7 @@
     MapWindow();
 
-    gSystem->ProcessEvents();
+    // FIXME: This is a workaround, because TApplication::Run is not thread safe against ProcessEvents
+    if (gApplication->InheritsFrom(TRint::Class()))
+        gSystem->ProcessEvents();
 }
 
@@ -732,5 +742,7 @@
 
     // display new tab in the main frame
-    gClient->ProcessEventsFor(fTab);
+    // FIXME: This is a workaround, because TApplication::Run is not thread safe against ProcessEvents
+    if (gApplication->InheritsFrom(TRint::Class()))
+        gClient->ProcessEventsFor(fTab);
 
     *fLog << inf << "Adding Raw Tab '" << name << "' (" << f->GetWidth() << "x";
@@ -784,5 +796,7 @@
 
     // display new tab in the main frame
-    gClient->ProcessEventsFor(fTab);
+    // FIXME: This is a workaround, because TApplication::Run is not thread safe against ProcessEvents
+    if (gApplication->InheritsFrom(TRint::Class()))
+        gClient->ProcessEventsFor(fTab);
 
     *fLog << inf << "Adding Tab '" << name << "' (" << f->GetWidth() << "x";
@@ -910,5 +924,7 @@
 
     // display new tab in the main frame
-    gClient->ProcessEventsFor(fTab);
+    // FIXME: This is a workaround, because TApplication::Run is not thread safe against ProcessEvents
+    if (gApplication->InheritsFrom(TRint::Class()))
+        gClient->ProcessEventsFor(fTab);
 
     *fLog << inf << "Removed Tab #" << i << " '" << name << "'" << endl;
