File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,9 @@ bool _requestAccessibility(bool showDialog) {
3030 NSNumber *windowNumber = info[(id )kCGWindowNumber ];
3131
3232 if ([windowNumber intValue ] == handle) {
33- CFRelease (windowList);
34- return info;
33+ NSDictionary * windowInfo = (NSDictionary *)CFPropertyListCreateDeepCopy (kCFAllocatorDefault , (CFPropertyListRef)info, kCFPropertyListMutableContainers );
34+ CFRelease (windowList);
35+ return windowInfo;
3536 }
3637 }
3738
@@ -136,11 +137,9 @@ AXUIElementRef getAXWindowById(int handle) {
136137 auto app = [NSRunningApplication runningApplicationWithProcessIdentifier: [ownerPid intValue ]];
137138
138139 if (![app isActive ]) {
139- [app release ];
140140 continue ;
141141 }
142142
143- [app release ];
144143 CFRelease (windowList);
145144 return Napi::Number::New (env, [windowNumber intValue ]);
146145 }
@@ -166,7 +165,6 @@ AXUIElementRef getAXWindowById(int handle) {
166165
167166 cacheWindow (handle, [ownerPid intValue ]);
168167
169- [app release ];
170168 return obj;
171169 }
172170
You can’t perform that action at this time.
0 commit comments