Fix uninitialized thread pointer in wxMSW wxJoystick
Initialize m_thread to null to ensure we don't dereference an invalid pointer later if no joystick with the specified index was found. Closes https://github.com/wxWidgets/wxWidgets/pull/1663
This commit is contained in:
committed by
Vadim Zeitlin
parent
632363775d
commit
4340841565
@@ -157,6 +157,7 @@ wxJoystick::wxJoystick(int joystick)
|
||||
JOYINFO joyInfo;
|
||||
int i, maxsticks;
|
||||
|
||||
m_thread = NULL;
|
||||
maxsticks = joyGetNumDevs();
|
||||
for( i=0; i<maxsticks; i++ )
|
||||
{
|
||||
|
Reference in New Issue
Block a user