Skip to content

Commit

Permalink
fix possible crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Epix37 committed Aug 17, 2015
1 parent 6a32869 commit f92f530
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Hearthstone Deck Tracker/HsLogReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,9 @@ private void Analyze(string log)
var actionStartingEntityId = int.Parse(match.Groups["id"].Value);
if (string.IsNullOrEmpty(actionStartingCardId))
{
actionStartingCardId = Game.Entities[actionStartingEntityId].CardId;
Entity tmpEntity;
if(Game.Entities.TryGetValue(actionStartingEntityId, out tmpEntity))
actionStartingCardId = tmpEntity.CardId;
}
if (!string.IsNullOrEmpty(actionStartingCardId))
{
Expand Down

0 comments on commit f92f530

Please sign in to comment.