fix null-pointer crash

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ryan Norton
2005-02-14 23:00:27 +00:00
parent da9d044c68
commit 2ff29ddf87

View File

@@ -152,15 +152,19 @@ USB Product Name
//Get [product] name //Get [product] name
m_szProductName = wxMacCFStringHolder( (CFStringRef) CFDictionaryGetValue(pDictionary, CFSTR(kIOHIDProductKey)), false ).AsString(); m_szProductName = wxMacCFStringHolder( (CFStringRef) CFDictionaryGetValue(pDictionary, CFSTR(kIOHIDProductKey)), false ).AsString();
CFNumberGetValue( CFNumberRef nref = (CFNumberRef) CFDictionaryGetValue(pDictionary, CFSTR(kIOHIDProductIDKey));
(CFNumberRef) CFDictionaryGetValue(pDictionary, CFSTR(kIOHIDProductIDKey)),
if (nref)
CFNumberGetValue(
nref,
kCFNumberIntType, kCFNumberIntType,
&m_nProductId &m_nProductId
); );
nref = (CFNumberRef) CFDictionaryGetValue(pDictionary, CFSTR(kIOHIDVendorIDKey));
if (nref)
CFNumberGetValue( CFNumberGetValue(
(CFNumberRef) CFDictionaryGetValue(pDictionary, CFSTR(kIOHIDVendorIDKey)), nref,
kCFNumberIntType, kCFNumberIntType,
&m_nManufacturerId &m_nManufacturerId
); );