mirror of
https://github.com/TextureGroup/Texture.git
synced 2026-04-07 19:17:39 +00:00
[ASTextNode2] Check that rangeOut is non-nil before dereferencing (#1980)
rangeOut is a nullable parameter, but we are treating it as though it is always not null. Make sure it is not null before dereferencing it.
This commit is contained in:
@@ -702,7 +702,9 @@ static NSArray *DefaultLinkAttributeNames() {
|
||||
continue;
|
||||
}
|
||||
|
||||
*rangeOut = NSIntersectionRange(visibleRange, effectiveRange);
|
||||
if (rangeOut != NULL) {
|
||||
*rangeOut = NSIntersectionRange(visibleRange, effectiveRange);
|
||||
}
|
||||
|
||||
if (attributeNameOut != NULL) {
|
||||
*attributeNameOut = attributeName;
|
||||
|
||||
Reference in New Issue
Block a user