static analysis: Fixed several complaints from codechecker.

There are still some pending Objective-C specific issues.

Reference issue #4600.
This commit is contained in:
Ryan C. Gordon
2022-03-24 11:00:43 -04:00
parent eadc064e2c
commit 4fe7b2cbd1
10 changed files with 33 additions and 20 deletions

View File

@@ -227,7 +227,7 @@ HIDAPI_CleanupDeviceDriver(SDL_HIDAPI_Device *device)
}
/* Disconnect any joysticks */
while (device->num_joysticks) {
while (device->num_joysticks && device->joysticks) {
HIDAPI_JoystickDisconnected(device, device->joysticks[0]);
}