Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/02/10 12:53:45 (15 years ago)
Author:
gkronber
Message:

Fixed a bug in loading of persisted function libraries. #880 (Max and min time offsets for variable symbols are not set correctly by FunctionLibraryInjectors)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Variable.cs

    r2843 r2910  
    165165    public override void Populate(System.Xml.XmlNode node, System.Collections.Generic.IDictionary<System.Guid, HeuristicLab.Core.IStorable> restoredObjects) {
    166166      base.Populate(node, restoredObjects);
    167       MinTimeOffset = XmlConvert.ToInt32(node.Attributes["MinTimeOffset"].Value);
    168       MaxTimeOffset = XmlConvert.ToInt32(node.Attributes["MaxTimeOffset"].Value);
     167      if (node.Attributes["MinTimeOffset"] != null)
     168        MinTimeOffset = XmlConvert.ToInt32(node.Attributes["MinTimeOffset"].Value);
     169      else MinTimeOffset = 0;
     170      if (node.Attributes["MaxTimeOffset"] != null)
     171        MaxTimeOffset = XmlConvert.ToInt32(node.Attributes["MaxTimeOffset"].Value);
     172      else MaxTimeOffset = 0;
    169173    }
    170174    #endregion
Note: See TracChangeset for help on using the changeset viewer.