1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-19 04:29:09 +00:00

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

This commit is contained in:
Michael Lutz
2021-04-05 12:18:45 +02:00
committed by GitHub
parent 295d542911
commit 1cd3a3b070

View File

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