From ef163b80a7cc1e001c8159679c2484a11f2a06b7 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Tue, 13 Jul 2021 11:46:58 +0200 Subject: [PATCH] Fix naming native threads on Linux and Android --- Source/Engine/Platform/Android/AndroidThread.h | 2 +- Source/Engine/Platform/Linux/LinuxThread.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; }