Skip to content

Commit 3d1e926

Browse files
authored
Merge pull request nefarius#634 from Blackmage89/master
Fixed exception on startup when list of profiles is null - issue nefarius#225
2 parents c6079e6 + 84d625b commit 3d1e926

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

ScpProfiler/MainWindow.xaml.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,15 @@ private void Window_Initialized(object sender, EventArgs e)
3333

3434
MainGrid.DataContext = _vm;
3535

36-
_vm.Profiles = _proxy.GetProfiles().ToList();
36+
var list = _proxy.GetProfiles();
37+
if (list == null)
38+
{
39+
list = new List<DualShockProfile>();
40+
}
41+
else
42+
{
43+
_vm.Profiles = list.ToList();
44+
}
3745
}
3846

3947
private void ProxyOnNativeFeedReceived(object sender, ScpHidReport report)

0 commit comments

Comments
 (0)