Skip to content

Commit

Permalink
Check note data key in dict before adding
Browse files Browse the repository at this point in the history
  • Loading branch information
ckosmic committed Sep 3, 2022
1 parent 22ade93 commit 9944696
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion SliceDetails/SliceRecorder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ private void ProcessNote(NoteController noteController, NoteCutInfo noteCutInfo)

NoteInfo noteInfo = new NoteInfo(noteController.noteData, noteCutInfo, cutAngle, cutOffset, noteGridPosition, noteIndex);

_noteSwingInfos.Add(noteController.noteData, noteInfo);
if (!_noteSwingInfos.ContainsKey(noteController.noteData))
{
_noteSwingInfos.Add(noteController.noteData, noteInfo);
}
}

public void ScoringForNoteFinishedHandler(ScoringElement scoringElement) {
Expand Down

0 comments on commit 9944696

Please sign in to comment.