From 08ebb00c6932dd1043f54b41960db7a3f6d88c3e Mon Sep 17 00:00:00 2001 From: sr55 Date: Fri, 18 May 2018 23:50:20 +0100 Subject: WinGui: Potential Fix for #1288 Crash in the TreeViewHelper when selecting presets. --- win/CS/HandBrakeWPF/Helpers/TreeViewHelper.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/win/CS/HandBrakeWPF/Helpers/TreeViewHelper.cs b/win/CS/HandBrakeWPF/Helpers/TreeViewHelper.cs index 99b458859..4ca799665 100644 --- a/win/CS/HandBrakeWPF/Helpers/TreeViewHelper.cs +++ b/win/CS/HandBrakeWPF/Helpers/TreeViewHelper.cs @@ -62,6 +62,11 @@ namespace HandBrakeWPF.Helpers private static bool SelectItem(object o, TreeViewItem parentItem) { + if (parentItem == null) + { + return false; + } + bool found = false; foreach (var item in parentItem.Items) { -- cgit v1.2.3