From 8a8793e00c7bf725c36ab8648c6fde63f633355e Mon Sep 17 00:00:00 2001 From: Marco Antognini Date: Wed, 7 Jan 2015 00:30:54 +0100 Subject: [PATCH] Fixed typo in JoystickImpl.cpp to prevent crash on OS X --- src/SFML/Window/OSX/JoystickImpl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);