correct an issue of trackbar on macOS

Python binding is passing NULL as (int*)value.
sliderChanged crash when trying to dereference value
This commit is contained in:
David Geldreich 2022-07-15 19:35:32 +02:00
parent 139c443770
commit 60846b2b7a

View File

@ -1201,7 +1201,7 @@ static NSSize constrainAspectRatio(NSSize base, NSSize constraint) {
(void)notification;
int pos = [slider intValue];
NSString *temp = [self initialName];
NSString *text = [NSString stringWithFormat:@"%@ %d", temp, *value];
NSString *text = [NSString stringWithFormat:@"%@ %d", temp, pos];
[name setStringValue: text];
if(value)
*value = pos;