summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2018-05-18 23:50:20 +0100
committersr55 <[email protected]>2018-05-18 23:50:20 +0100
commit08ebb00c6932dd1043f54b41960db7a3f6d88c3e (patch)
tree34a90245e1bf7b80f91b5ce577420932695a2752
parent6adf898b09e6d214b6629f16632d262630518e5f (diff)
WinGui: Potential Fix for #1288 Crash in the TreeViewHelper when selecting presets.
-rw-r--r--win/CS/HandBrakeWPF/Helpers/TreeViewHelper.cs5
1 files changed, 5 insertions, 0 deletions
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)
{