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:
@@ -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
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user