diff --git a/Source/Engine/Platform/Android/AndroidThread.h b/Source/Engine/Platform/Android/AndroidThread.h index 05faa15c2..ebd2368ac 100644 --- a/Source/Engine/Platform/Android/AndroidThread.h +++ b/Source/Engine/Platform/Android/AndroidThread.h @@ -46,7 +46,7 @@ protected: int32 Start(pthread_attr_t& attr) override { const int result = pthread_create(&_thread, &attr, ThreadProc, this); - if (result != 0) + if (result == 0) pthread_setname_np(_thread, _name.ToStringAnsi().Get()); return result; } diff --git a/Source/Engine/Platform/Linux/LinuxThread.h b/Source/Engine/Platform/Linux/LinuxThread.h index a7a00b7ce..6fc7fc754 100644 --- a/Source/Engine/Platform/Linux/LinuxThread.h +++ b/Source/Engine/Platform/Linux/LinuxThread.h @@ -46,7 +46,7 @@ protected: int32 Start(pthread_attr_t& attr) override { const int result = pthread_create(&_thread, &attr, ThreadProc, this); - if (result != 0) + if (result == 0) pthread_setname_np(_thread, _name.ToStringAnsi().Get()); return result; }