Skip to content

Commit 84d625b

Browse files
Fixed exception on startup when list of profiles is null
1 parent 5d60d01 commit 84d625b

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)