Browse Source

Fixed null reference exception in control flow graph builder.

newNRvisualizers
Mike Krüger 14 years ago
parent
commit
bb4cafa0a5
  1. 3
      ICSharpCode.NRefactory.CSharp/Analysis/ControlFlow.cs

3
ICSharpCode.NRefactory.CSharp/Analysis/ControlFlow.cs

@ -420,7 +420,8 @@ namespace ICSharpCode.NRefactory.CSharp.Analysis @@ -420,7 +420,8 @@ namespace ICSharpCode.NRefactory.CSharp.Analysis
falseEnd = ifElseStatement.FalseStatement.AcceptVisitor(this, falseBegin);
}
ControlFlowNode end = builder.CreateEndNode(ifElseStatement);
Connect(trueEnd, end);
if (trueEnd != null)
Connect(trueEnd, end);
if (falseEnd != null) {
Connect(falseEnd, end);
} else if (cond != true) {

Loading…
Cancel
Save