Browse Source

Fixed possible null exception in control flow node.

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

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

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
@ -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