diff --git a/modules/highgui/src/window_cocoa.mm b/modules/highgui/src/window_cocoa.mm index e9cf5a3c1b..ef3f828cf8 100644 --- a/modules/highgui/src/window_cocoa.mm +++ b/modules/highgui/src/window_cocoa.mm @@ -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;