From cd35daee423744a2e5e08735871be998f61bb7b2 Mon Sep 17 00:00:00 2001 From: "ryochan7@protonmail.com" Date: Mon, 30 Dec 2019 01:18:33 -0600 Subject: [PATCH] Minor tweak --- DS4Windows/DS4Forms/MainWindow.xaml.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/DS4Windows/DS4Forms/MainWindow.xaml.cs b/DS4Windows/DS4Forms/MainWindow.xaml.cs index 619c208..802f88f 100644 --- a/DS4Windows/DS4Forms/MainWindow.xaml.cs +++ b/DS4Windows/DS4Forms/MainWindow.xaml.cs @@ -301,7 +301,10 @@ Suspend support not enabled.", true); Dispatcher.BeginInvoke((Action)(() => { int count = logListView.Items.Count; - logListView.ScrollIntoView(logvm.LogItems[count > 0 ? count-1 : 0]); + if (count > 0) + { + logListView.ScrollIntoView(logvm.LogItems[count - 1]); + } })); } }