From 1cd3a3b070a9e17acdbe9a875a305643bc834e6a Mon Sep 17 00:00:00 2001 From: Michael Lutz Date: Mon, 5 Apr 2021 12:18:45 +0200 Subject: [PATCH] Fix #8935: [OSX] Crash when clicking 'Save' due to wrongly-threaded OS call. (#8944) --- 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 9fb74cd041..c16d196906 100644 --- a/src/video/cocoa/cocoa_v.mm +++ b/src/video/cocoa/cocoa_v.mm @@ -224,7 +224,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); }