From c92a198ef5c8403c486d98ecc823008457a8fa3d Mon Sep 17 00:00:00 2001 From: Michael Lutz Date: Sun, 4 Apr 2021 10:31:50 +0200 Subject: [PATCH] Fix #8935: [OSX] Crash when clicking 'Save' due to wrongly-threaded OS call. --- src/video/cocoa/cocoa_v.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm index f17f0f35e3..59bf1d6d9d 100644 --- a/src/video/cocoa/cocoa_v.mm +++ b/src/video/cocoa/cocoa_v.mm @@ -226,7 +226,7 @@ bool VideoDriver_Cocoa::AfterBlitterChange() */ void VideoDriver_Cocoa::EditBoxLostFocus() { - [ [ this->cocoaview inputContext ] discardMarkedText ]; + [ [ this->cocoaview inputContext ] performSelectorOnMainThread:@selector(discardMarkedText) withObject:nil waitUntilDone:[ NSThread isMainThread ] ]; /* Clear any marked string from the current edit box. */ HandleTextInput(nullptr, true); }