mirror of https://github.com/encounter/SDL.git
Don't duplicate the serial number twice if a child doesn't set one
This commit is contained in:
parent
d90c0d41cc
commit
201484ff6f
|
@ -94,6 +94,8 @@ HIDAPI_DriverCombined_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joys
|
||||||
serial = new_serial;
|
serial = new_serial;
|
||||||
serial_length = new_length;
|
serial_length = new_length;
|
||||||
}
|
}
|
||||||
|
SDL_free(joystick->serial);
|
||||||
|
joystick->serial = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue