From 759cd66f18600275fe62de77ee43f536895634f0 Mon Sep 17 00:00:00 2001 From: spacechase0 Date: Fri, 17 May 2019 18:28:25 -0400 Subject: [PATCH] Fix exception when pressing Add Controllers button --- BetterJoyForCemu/3rdPartyControllers.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/BetterJoyForCemu/3rdPartyControllers.cs b/BetterJoyForCemu/3rdPartyControllers.cs index 2d42d3d..3227886 100644 --- a/BetterJoyForCemu/3rdPartyControllers.cs +++ b/BetterJoyForCemu/3rdPartyControllers.cs @@ -29,8 +29,13 @@ namespace BetterJoyForCemu { private bool ContainsText(ListBox a, String manu) { foreach (var v in a.Items) - if ((v as dynamic).Text.Equals(manu)) + { + dynamic d = v as dynamic; + if (d.Text == null) + continue; + if (d.Text.Equals(manu)) return true; + } return false; }