diff options
| author | Léo Lam <leo@leolam.fr> | 2020-09-24 13:47:02 +0200 |
|---|---|---|
| committer | Léo Lam <leo@leolam.fr> | 2020-09-24 13:55:36 +0200 |
| commit | 4cb68509c741120f4143c981e5c08582673b94e9 (patch) | |
| tree | 726fb431210994a822e31cc7e248180fb57b92d7 /src/KingSystem/Utils/Thread/TaskThread.cpp | |
| parent | 7a5f9dae9b6a5205ce1fb49d5101a7c0d81194c3 (diff) | |
ksys/Utils: Fix inaccuracy in TaskThread dtor
Diffstat (limited to 'src/KingSystem/Utils/Thread/TaskThread.cpp')
| -rw-r--r-- | src/KingSystem/Utils/Thread/TaskThread.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/KingSystem/Utils/Thread/TaskThread.cpp b/src/KingSystem/Utils/Thread/TaskThread.cpp index ff2e0f91..27dcd4e9 100644 --- a/src/KingSystem/Utils/Thread/TaskThread.cpp +++ b/src/KingSystem/Utils/Thread/TaskThread.cpp @@ -17,8 +17,9 @@ TaskThread::~TaskThread() { return; mTaskQueue->removeThread(this); - if (mFlags.isOff(Flag::DoesNotOwnTaskQueue) && mTaskQueue) { - delete mTaskQueue; + if (mFlags.isOff(Flag::DoesNotOwnTaskQueue)) { + if (mTaskQueue) + delete mTaskQueue; mTaskQueue = nullptr; } } |
