Merge pull request #156 from spacechase0/addcontrollers-bugfix

Fix exception when pressing Add Controllers button
This commit is contained in:
David Khachaturov 2019-05-18 10:23:33 +01:00 committed by GitHub
commit 425fe7ec93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}