diff options
author | Michael Lutz <michi@icosahedron.de> | 2021-04-05 12:18:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-05 12:18:45 +0200 |
commit | 1cd3a3b070a9e17acdbe9a875a305643bc834e6a (patch) | |
tree | 6e9ffea59f500ac04cecffcc83e6c261888bee62 | |
parent | 295d5429114bd11280f910a1f5e9fd1367886c1a (diff) | |
download | openttd-1cd3a3b070a9e17acdbe9a875a305643bc834e6a.tar.xz |
Fix #8935: [OSX] Crash when clicking 'Save' due to wrongly-threaded OS call. (#8944)
-rw-r--r-- | src/video/cocoa/cocoa_v.mm | 2 |
1 files changed, 1 insertions, 1 deletions
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); } |