]> granicus.if.org Git - handbrake/commitdiff
WinGui: Potential Fix for #1288 Crash in the TreeViewHelper when selecting presets.
authorsr55 <sr55.hb@outlook.com>
Fri, 18 May 2018 22:50:20 +0000 (23:50 +0100)
committersr55 <sr55.hb@outlook.com>
Fri, 18 May 2018 22:50:32 +0000 (23:50 +0100)
win/CS/HandBrakeWPF/Helpers/TreeViewHelper.cs

index 99b45885906407caebe04f32fd7fc81ff7969aed..4ca79966585d35c12c86956e3505af7eb4edd0a5 100644 (file)
@@ -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)
             {