From 716d989c5b836eef8652330663e073eb5095f242 Mon Sep 17 00:00:00 2001 From: jaegonlee Date: Tue, 22 Feb 2022 23:19:40 +0900 Subject: [PATCH] avoid crash on starting newt window --- src/newt/native/MacNewtNSWindow.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/newt/native/MacNewtNSWindow.m b/src/newt/native/MacNewtNSWindow.m index eef3278b9..0d6b1a6b9 100644 --- a/src/newt/native/MacNewtNSWindow.m +++ b/src/newt/native/MacNewtNSWindow.m @@ -848,7 +848,9 @@ + (BOOL) initNatives: (JNIEnv*) env forClass: (jclass) clazz insetsChangedID && sizeScreenPosInsetsChangedID && screenPositionChangedID && focusChangedID && windowDestroyNotifyID && requestFocusID && windowRepaintID) { - CKCH_CreateDictionaries(); + dispatch_async(dispatch_get_main_queue(), ^(){ + CKCH_CreateDictionaries(); + }); return YES; } return NO;