diff --git a/UI/obs-app.cpp b/UI/obs-app.cpp index c3fdcc006..d058c0ee4 100644 --- a/UI/obs-app.cpp +++ b/UI/obs-app.cpp @@ -2070,6 +2070,7 @@ static int run_program(fstream &logFile, int argc, char *argv[]) #if __APPLE__ InstallNSApplicationSubclass(); + InstallNSThreadLocks(); if (!isInBundle()) { blog(LOG_ERROR, diff --git a/UI/platform-osx.mm b/UI/platform-osx.mm index 1a5ab3f13..23b4d28e5 100644 --- a/UI/platform-osx.mm +++ b/UI/platform-osx.mm @@ -278,6 +278,15 @@ void TaskbarOverlaySetStatus(TaskbarOverlayStatus status) } @end +void InstallNSThreadLocks() +{ + [[NSThread new] start]; + + if ([NSThread isMultiThreaded] != 1) { + abort(); + } +} + void InstallNSApplicationSubclass() { [OBSApplication sharedApplication]; diff --git a/UI/platform.hpp b/UI/platform.hpp index cef63d300..f65b31ca7 100644 --- a/UI/platform.hpp +++ b/UI/platform.hpp @@ -84,5 +84,6 @@ void EnableOSXVSync(bool enable); void EnableOSXDockIcon(bool enable); bool isInBundle(); void InstallNSApplicationSubclass(); +void InstallNSThreadLocks(); void disableColorSpaceConversion(QWidget *window); #endif