diff --git a/ICSharpCode.NRefactory.CSharp/Analysis/ControlFlow.cs b/ICSharpCode.NRefactory.CSharp/Analysis/ControlFlow.cs index d2bdf7af9e..2812375b11 100644 --- a/ICSharpCode.NRefactory.CSharp/Analysis/ControlFlow.cs +++ b/ICSharpCode.NRefactory.CSharp/Analysis/ControlFlow.cs @@ -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 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) {