From 1cd3a3b070a9e17acdbe9a875a305643bc834e6a Mon Sep 17 00:00:00 2001 From: Michael Lutz Date: Mon, 5 Apr 2021 12:18:45 +0200 Subject: 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(-) (limited to 'src/video/cocoa') diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm index 9fb74cd04..c16d19690 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); } -- cgit v1.2.3-70-g09d2