diff --git a/src/SFML/Window/OSX/JoystickImpl.cpp b/src/SFML/Window/OSX/JoystickImpl.cpp index 03e81ee2..ce1b7942 100644 --- a/src/SFML/Window/OSX/JoystickImpl.cpp +++ b/src/SFML/Window/OSX/JoystickImpl.cpp @@ -53,7 +53,7 @@ namespace std::string getDeviceString(IOHIDDeviceRef ref, CFStringRef prop, unsigned int index) { CFTypeRef typeRef = IOHIDDeviceGetProperty(ref, prop); - if (ref && (CFGetTypeID(typeRef) == CFStringGetTypeID())) + if (typeRef && (CFGetTypeID(typeRef) == CFStringGetTypeID())) { CFStringRef str = static_cast(typeRef); return stringFromCFString(str); @@ -68,7 +68,7 @@ namespace unsigned int getDeviceUint(IOHIDDeviceRef ref, CFStringRef prop, unsigned int index) { CFTypeRef typeRef = IOHIDDeviceGetProperty(ref, prop); - if (ref && (CFGetTypeID(typeRef) == CFNumberGetTypeID())) + if (typeRef && (CFGetTypeID(typeRef) == CFNumberGetTypeID())) { SInt32 value; CFNumberGetValue((CFNumberRef)typeRef, kCFNumberSInt32Type, &value);