Permalink
Browse files

Fixed NullReferenceException in ControlFlow.NodeCreationVisitor.Visit…

…SwitchStatement.
  • Loading branch information...
1 parent f70a726 commit 858d4cc673d3029460f6a009a3fb268884304c7f @dgrunwald dgrunwald committed Dec 9, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 ICSharpCode.NRefactory.CSharp/Analysis/ControlFlow.cs
@@ -436,7 +436,7 @@ public override ControlFlowNode VisitSwitchStatement(SwitchStatement switchState
}
}
}
- if (constant.IsCompileTimeConstant && sectionMatchedByConstant == null)
+ if (constant != null && constant.IsCompileTimeConstant && sectionMatchedByConstant == null)
sectionMatchedByConstant = defaultSection;
int gotoCaseOrDefaultInOuterScope = gotoCaseOrDefault.Count;

0 comments on commit 858d4cc

Please sign in to comment.