Skip to content
Browse files
8242544: CMD+ENTER key event crashes the application when invoked on …

Backport-of: a2a0acff66727167bfca879bf908361433e74791
  • Loading branch information
kevinrushforth committed Feb 11, 2022
1 parent f52ded7 commit b0ae8b6
Showing 1 changed file with 4 additions and 1 deletion.
@@ -989,7 +989,10 @@ static jlong _createWindowCommonDo(JNIEnv *env, jobject jWindow, jlong jOwnerPtr
[window->nsWindow performSelectorOnMainThread:@selector(setContentView:) withObject:nil waitUntilDone:YES];
// If the contentView is set to nil within performKeyEquivalent: the OS will crash.
NSView* dummy = [[NSView alloc] initWithFrame: NSMakeRect(0, 0, 10, 10)];
[window->nsWindow performSelectorOnMainThread:@selector(setContentView:) withObject:dummy waitUntilDone:YES];
[dummy release];

1 comment on commit b0ae8b6

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.