safety fix in case code incorrectly tries to use the reuslt of forwarding a method to the undo manager.

This commit is contained in:
rfm 2024-10-29 14:59:43 +00:00
parent 313b9b5610
commit 3e55c3b296
2 changed files with 13 additions and 0 deletions

View file

@ -429,6 +429,11 @@
*/
- (void) forwardInvocation: (NSInvocation*)anInvocation
{
NSUInteger size = [[anInvocation methodSignature] methodReturnLength];
unsigned char v[size];
memset(v, '\0', size);
if (_disableCount == 0)
{
if (_nextTarget == nil)
@ -466,6 +471,8 @@
_runLoopGroupingPending = YES;
}
}
[anInvocation setReturnValue: (void*)v];
}
/**