From f63dcad0b4ee96fa59ecf6325ac784f1325d81ad Mon Sep 17 00:00:00 2001 From: David Smith Date: Fri, 24 Jul 2015 19:54:55 -0500 Subject: [PATCH] Bug fix: Don't try to load first line of an empty list. --- TallyCore/Votes/VoteConstructor.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TallyCore/Votes/VoteConstructor.cs b/TallyCore/Votes/VoteConstructor.cs index fc0b8610..b74a14d6 100644 --- a/TallyCore/Votes/VoteConstructor.cs +++ b/TallyCore/Votes/VoteConstructor.cs @@ -124,7 +124,8 @@ public Dictionary>> SeparateVoteTypes(List p postLines = postLines.Skip(basePlan.Count).ToList(); - bpMatch = basePlanRegex.Match(postLines.First()); + if (postLines.Count > 0) + bpMatch = basePlanRegex.Match(postLines.First()); }