diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m index af1ea5839..8b9b1f104 100644 --- a/hw/xquartz/X11Application.m +++ b/hw/xquartz/X11Application.m @@ -200,6 +200,14 @@ QuartzModeBundleInit(void); - (void) sendEvent:(NSEvent *)e { + /* Don't try sending to X if we haven't initialized. This can happen if AppKit takes over + * (eg: uncaught exception) early in launch. + */ + if (!eventTranslationQueue) { + [super sendEvent:e]; + return; + } + OSX_BOOL for_appkit, for_x; OSX_BOOL const x_active = self.x_active;