Fix deallocation of controllers with no axes

This commit is contained in:
Edward Richardson 2015-09-05 14:18:48 +12:00
parent 8ec4d431cf
commit abb033d400
1 changed files with 1 additions and 1 deletions

View File

@ -309,7 +309,7 @@ FDInputJoystick::~FDInputJoystick()
{
Joy_GenerateButtonEvents(Axes[0].ButtonValue, 0, 2, KEY_JOYAXIS1PLUS);
}
else
else if (Axes.Size() > 1)
{
Joy_GenerateButtonEvents(Axes[1].ButtonValue, 0, 4, KEY_JOYAXIS1PLUS);
for (i = 2; i < Axes.Size(); ++i)