# HG changeset patch
# User Laurent Bessard
# Date 1371109063 -7200
# Node ID ff59c6a8b79391785fc2860fab907a3fdce427f5
# Parent  ebc76535553684ecfae118b940e18d2af5280f9e
Fixed bug forced debug variable not released when unsubscribed and re-subscribed while PLC is stopped

diff -r ebc765355536 -r ff59c6a8b793 ProjectController.py
--- a/ProjectController.py	Thu Jun 13 09:35:41 2013 +0200
+++ b/ProjectController.py	Thu Jun 13 09:37:43 2013 +0200
@@ -1237,6 +1237,8 @@
         IECdebug_data = self.IECdebug_datas.get(IECPath, None)
         if IECdebug_data is not None:
             IECdebug_data[0].pop(callableobj,None)
+            if len(IECdebug_data[0]) == 0:
+                self.IECdebug_datas.pop(IECPath)
         self.IECdebug_lock.release()
 
         self.ReArmDebugRegisterTimer()