Skip to content

Commit

Permalink
Merge pull request nefarius#634 from Blackmage89/master
Browse files Browse the repository at this point in the history
Fixed exception on startup when list of profiles is null - issue nefarius#225
  • Loading branch information
nefarius authored May 25, 2017
2 parents c6079e6 + 84d625b commit 3d1e926
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ScpProfiler/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,15 @@ private void Window_Initialized(object sender, EventArgs e)

MainGrid.DataContext = _vm;

_vm.Profiles = _proxy.GetProfiles().ToList();
var list = _proxy.GetProfiles();
if (list == null)
{
list = new List<DualShockProfile>();
}
else
{
_vm.Profiles = list.ToList();
}
}

private void ProxyOnNativeFeedReceived(object sender, ScpHidReport report)
Expand Down

0 comments on commit 3d1e926

Please sign in to comment.