X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/65442ab650425a5f6a1d5d685e8df582401a9be7..852a8f8b532510da1e0a4e802f8ef84a6217e7a3:/src/mac/corefoundation/hid.cpp diff --git a/src/mac/corefoundation/hid.cpp b/src/mac/corefoundation/hid.cpp index 75eec3cbc1..16c956b207 100644 --- a/src/mac/corefoundation/hid.cpp +++ b/src/mac/corefoundation/hid.cpp @@ -152,15 +152,19 @@ USB Product Name //Get [product] name m_szProductName = wxMacCFStringHolder( (CFStringRef) CFDictionaryGetValue(pDictionary, CFSTR(kIOHIDProductKey)), false ).AsString(); - CFNumberGetValue( - (CFNumberRef) CFDictionaryGetValue(pDictionary, CFSTR(kIOHIDProductIDKey)), + CFNumberRef nref = (CFNumberRef) CFDictionaryGetValue(pDictionary, CFSTR(kIOHIDProductIDKey)); + + if (nref) + CFNumberGetValue( + nref, kCFNumberIntType, &m_nProductId ); - + nref = (CFNumberRef) CFDictionaryGetValue(pDictionary, CFSTR(kIOHIDVendorIDKey)); + if (nref) CFNumberGetValue( - (CFNumberRef) CFDictionaryGetValue(pDictionary, CFSTR(kIOHIDVendorIDKey)), + nref, kCFNumberIntType, &m_nManufacturerId );