Fix #8935: [OSX] Crash when clicking 'Save' due to wrongly-threaded OS call.

This commit is contained in:
Michael Lutz
2021-04-04 10:31:50 +02:00
committed by dP
parent a7365c129d
commit c92a198ef5

View File

@@ -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);
}