Backends/SDL2/Controller: x
-> x != NULL
and removed unnecessary braces
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
This commit is contained in:
parent
d870805068
commit
d41bf46c1a
1 changed files with 1 additions and 5 deletions
|
@ -172,15 +172,11 @@ void ControllerBackend_JoystickConnect(Sint32 joystick_id)
|
|||
|
||||
// Set up neutral axes
|
||||
axis_neutrals = (Sint16*)malloc(sizeof(Sint16) * total_axes);
|
||||
if (axis_neutrals)
|
||||
{
|
||||
if (axis_neutrals != NULL)
|
||||
for (int i = 0; i < total_axes; ++i)
|
||||
axis_neutrals[i] = SDL_JoystickGetAxis(joystick, i);
|
||||
}
|
||||
else
|
||||
{
|
||||
Backend_PrintError("Couldn't allocate memory for neutral axes");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue