Mercurial > dwindows
comparison mac/dw.m @ 2374:2a7fed3d11f5
Mac: Switch to performSelector: instead of calling implementation directly.
The parameter was NULL on ARM (M1) MacOS for some reason. We call directly
other places too, so might need to check more places but this fixes the
crashes.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 18 Mar 2021 00:01:37 +0000 |
parents | 707836e00e5e |
children | 6feefce31675 |
comparison
equal
deleted
inserted
replaced
2373:8d6ab1f46a29 | 2374:2a7fed3d11f5 |
---|---|
1235 if([self respondsToSelector:sel]) | 1235 if([self respondsToSelector:sel]) |
1236 { | 1236 { |
1237 DWTID curr = pthread_self(); | 1237 DWTID curr = pthread_self(); |
1238 | 1238 |
1239 if(DWThread == (DWTID)-1 || DWThread == curr) | 1239 if(DWThread == (DWTID)-1 || DWThread == curr) |
1240 { | 1240 [self performSelector:sel withObject:param]; |
1241 DWIMP imp = (DWIMP)[self methodForSelector:sel]; | |
1242 | |
1243 if(imp) | |
1244 imp(self, sel, param); | |
1245 } | |
1246 else | 1241 else |
1247 [self performSelectorOnMainThread:sel withObject:param waitUntilDone:YES]; | 1242 [self performSelectorOnMainThread:sel withObject:param waitUntilDone:YES]; |
1248 } | 1243 } |
1249 } | 1244 } |
1250 -(void)doBitBlt:(id)param | 1245 -(void)doBitBlt:(id)param |