Skip to content

Commit

Permalink
Fix crash when loading style form without initial style
Browse files Browse the repository at this point in the history
  • Loading branch information
ThoNohT committed Dec 16, 2017
1 parent 25cdcc0 commit 8181d77
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion NohBoard/Forms/Style/KeyboardStyleForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public partial class KeyboardStyleForm : Form
public KeyboardStyleForm(KeyboardStyle initialStyle)
{
this.initialStyle = initialStyle ?? new KeyboardStyle();
this.currentStyle = initialStyle.Clone();
this.currentStyle = this.initialStyle.Clone();
this.InitializeComponent();
}

Expand Down
2 changes: 1 addition & 1 deletion NohBoard/Forms/Style/MouseSpeedStyleForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public MouseSpeedStyleForm(MouseSpeedIndicatorStyle initialStyle, MouseSpeedIndi
this.initialStyle = initialStyle ?? new MouseSpeedIndicatorStyle();
this.defaultStyle = defaultStyle ?? throw new ArgumentNullException(nameof(defaultStyle));

this.currentStyle = (MouseSpeedIndicatorStyle)initialStyle.Clone();
this.currentStyle = (MouseSpeedIndicatorStyle)this.initialStyle.Clone();
this.InitializeComponent();
}

Expand Down

0 comments on commit 8181d77

Please sign in to comment.