mirror of
https://github.com/opencv/opencv.git
synced 2025-06-11 03:33:28 +08:00
Merge pull request #23390 from just-gull:bugfix.21401.fix-macos-crash-when-keypress-does-nothing
check keydown event characters length on macos
This commit is contained in:
commit
20eee64426
@ -618,7 +618,7 @@ CV_IMPL int cvWaitKey (int maxWait)
|
||||
inMode:NSDefaultRunLoopMode
|
||||
dequeue:YES];
|
||||
|
||||
if([event type] == NSKeyDown) {
|
||||
if([event type] == NSKeyDown && [[event characters] length]) {
|
||||
returnCode = [[event characters] characterAtIndex:0];
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user