Free cookie consent management tool by TermsFeed Policy Generator

Changeset 16393 for branches


Ignore:
Timestamp:
12/17/18 11:19:17 (6 years ago)
Author:
chaider
Message:

#2966 Checked null references

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2966_interval_calculation/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/IntervalInterpreter.cs

    r16383 r16393  
    130130        //Variables, Constants, ...
    131131        case OpCodes.Variable: {
    132             intervals.Add(currentInstr.dynamicNode, (Interval)currentInstr.data);
     132            if (intervals != null)
     133              intervals.Add(currentInstr.dynamicNode, (Interval)currentInstr.data);
    133134            var variableTreeNode = (VariableTreeNode)currentInstr.dynamicNode;
    134135            var variableWeight = variableTreeNode.Weight;
     
    139140            var constTreeNode = (ConstantTreeNode)currentInstr.dynamicNode;
    140141            var inter = new Interval(constTreeNode.Value, constTreeNode.Value);
    141             intervals.Add(currentInstr.dynamicNode, inter);
     142            if (intervals != null)
     143              intervals.Add(currentInstr.dynamicNode, inter);
    142144            return inter;
    143145          }
Note: See TracChangeset for help on using the changeset viewer.