diff --git a/Source/ASTextNode2.mm b/Source/ASTextNode2.mm index 6c5e53b4..0efe7a63 100644 --- a/Source/ASTextNode2.mm +++ b/Source/ASTextNode2.mm @@ -702,7 +702,9 @@ static NSArray *DefaultLinkAttributeNames() { continue; } - *rangeOut = NSIntersectionRange(visibleRange, effectiveRange); + if (rangeOut != NULL) { + *rangeOut = NSIntersectionRange(visibleRange, effectiveRange); + } if (attributeNameOut != NULL) { *attributeNameOut = attributeName;