diff --git a/3rdparty/joystick/jsMacOSX.cxx b/3rdparty/joystick/jsMacOSX.cxx
index e664bd1f3..d44a69173 100644
--- a/3rdparty/joystick/jsMacOSX.cxx
+++ b/3rdparty/joystick/jsMacOSX.cxx
@@ -167,8 +167,9 @@ jsJoystick::jsJoystick(int ident) :
 
     os = new struct os_specific_s;
 	os->num_hats = 0;
+    os->hidDev = nullptr;
 
-	// get the name now too
+    // get the name now too
 	CFDictionaryRef properties = getCFProperties(ioDevices[id]);
 	CFTypeRef ref = CFDictionaryGetValue (properties, CFSTR(kIOHIDProductKey));
 	if (!ref)