# HG changeset patch
# User laurent
# Date 1260434139 -3600
# Node ID 03e17cd5bde7cdadfe22e06f1627dbfb2fa69bb6
# Parent  9e4263099427d144efc7c6b9e3fa41868bd101b6
Bug when closing Beremiz without a project opened fixed

diff -r 9e4263099427 -r 03e17cd5bde7 Beremiz.py
--- a/Beremiz.py	Thu Dec 10 09:34:55 2009 +0100
+++ b/Beremiz.py	Thu Dec 10 09:35:39 2009 +0100
@@ -518,7 +518,8 @@
     
     def OnCloseFrame(self, event):
         if self.PluginRoot is None or self.CheckSaveBeforeClosing(_("Close Application")):
-            self.PluginRoot.KillDebugThread()
+            if self.PluginRoot is not None:
+                self.PluginRoot.KillDebugThread()
             self.KillLocalRuntime()
             event.Skip()
         else: