Changeset 5011


Ignore:
Timestamp:
12/02/10 16:07:46 (11 years ago)
Author:
epitzer
Message:

Check if namespace is null before splitting the string. (#1310)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Operators.Programmable/3.3/ProgrammableOperator.cs

    r4838 r5011  
    151151
    152152    private IEnumerable<string> GetNamespaceHierachy(string ns) {
    153       for (int i = ns.Length; i != -1; i = ns.LastIndexOf('.', i - 1)) {
    154         yield return ns.Substring(0, i);
     153      if (ns != null) {
     154        for (int i = ns.Length; i != -1; i = ns.LastIndexOf('.', i - 1)) {
     155          yield return ns.Substring(0, i);
     156        }
    155157      }
    156158    }
Note: See TracChangeset for help on using the changeset viewer.