# HG changeset patch # User Laurent Bessard # Date 1359478911 -3600 # Node ID 8dc28b21bdace085c401949e3a9ae19fc78e700f # Parent 94436558f0ceb65deef86ea00bc9453fbdbce0c5 Fix bug when closing project diff -r 94436558f0ce -r 8dc28b21bdac controls/PouInstanceVariablesPanel.py --- a/controls/PouInstanceVariablesPanel.py Tue Jan 29 21:34:43 2013 +1100 +++ b/controls/PouInstanceVariablesPanel.py Tue Jan 29 18:01:51 2013 +0100 @@ -105,13 +105,14 @@ self.RefreshView() def SetPouType(self, tagname, pou_instance=None): - self.PouTagName = tagname - if self.PouTagName == "Project": - config_name = self.Controller.GetProjectMainConfigurationName() - if config_name is not None: - self.PouTagName = self.Controller.ComputeConfigurationName(config_name) - if pou_instance is not None: - self.PouInstance = pou_instance + if self.Controller is not None: + self.PouTagName = tagname + if self.PouTagName == "Project": + config_name = self.Controller.GetProjectMainConfigurationName() + if config_name is not None: + self.PouTagName = self.Controller.ComputeConfigurationName(config_name) + if pou_instance is not None: + self.PouInstance = pou_instance self.RefreshView()