From f442f17034cb3839d944967ecb459f05918a811b Mon Sep 17 00:00:00 2001 From: David Chisnall Date: Sun, 31 Jan 2016 12:00:19 +0000 Subject: [PATCH] Set the count to 0 if no property attributes are copied. --- properties.m | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/properties.m b/properties.m index 36930a9..46026cc 100644 --- a/properties.m +++ b/properties.m @@ -502,7 +502,14 @@ const char *property_getAttributes(objc_property_t property) objc_property_attribute_t *property_copyAttributeList(objc_property_t property, unsigned int *outCount) { - if (NULL == property) { return NULL; } + if (NULL == property) + { + if (NULL != outCount) + { + *outCount = 0; + } + return NULL; + } objc_property_attribute_t attrs[12]; int count = 0;