From 82e55b4761c29368f3340f7e80e3afe48fe07fa7 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Tue, 3 Mar 2020 17:04:52 +0100 Subject: [PATCH] Fixed: _glyphsFrames and _glyphsOffsets could be used uninitialized in CPTextView (#2886) --- AppKit/CPTextView/CPLayoutManager.j | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/AppKit/CPTextView/CPLayoutManager.j b/AppKit/CPTextView/CPLayoutManager.j index 5ae1c525e..83ee76081 100644 --- a/AppKit/CPTextView/CPLayoutManager.j +++ b/AppKit/CPTextView/CPLayoutManager.j @@ -1156,7 +1156,9 @@ var _objectsInRange = function(aList, aRange) _range = CPMakeRangeCopy(aRange); _textContainer = aContainer; _isInvalid = NO; - _runs = [[CPMutableArray alloc] init]; + _runs = []; + _glyphsFrames = []; + _glyphsOffsets = []; for (location = aRange.location; location < CPMaxRange(aRange); location = CPMaxRange(effectiveRange)) {