fix crash in snes virtualpad when mouse is used

This commit is contained in:
zeromus 2017-07-06 20:48:46 -05:00
parent 2dd10ea951
commit cc33617f74
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ namespace BizHawk.Client.EmuHawk
PadBox.Controls.Add(new VirtualPadAnalogStick
{
Name = button.Name,
SecondaryName = button.SecondaryNames.Any() ? button.SecondaryNames[0] : "",
SecondaryName = (button.SecondaryNames != null && button.SecondaryNames.Any()) ? button.SecondaryNames[0] : "",
Location = UIHelper.Scale(button.Location),
Size = UIHelper.Scale(new Size(180 + 79, 200 + 9)),
RangeX = new float[] { button.MinValue, button.MidValue, button.MaxValue },