summaryrefslogtreecommitdiff
path: root/src/net/ipc.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-09-07 06:44:38 +0300
committerAndrei Karas <akaras@inbox.ru>2017-09-07 06:44:38 +0300
commitfec0a38e6a12c8674e54a29b0c3ae54fa78e86ff (patch)
treefa68e8d59ade869c1de33bce9eb60a8cd05fdbc8 /src/net/ipc.cpp
parentba0d8f949647aa4ced776438a1e1e9ebd77c4660 (diff)
downloadplus-fec0a38e6a12c8674e54a29b0c3ae54fa78e86ff.tar.gz
plus-fec0a38e6a12c8674e54a29b0c3ae54fa78e86ff.tar.bz2
plus-fec0a38e6a12c8674e54a29b0c3ae54fa78e86ff.tar.xz
plus-fec0a38e6a12c8674e54a29b0c3ae54fa78e86ff.zip
Fix possible thread structure memory leak on SDL2 if thread terminated before cleanup.
Diffstat (limited to 'src/net/ipc.cpp')
-rw-r--r--src/net/ipc.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/net/ipc.cpp b/src/net/ipc.cpp
index b3fd3da9d..407f8ca3b 100644
--- a/src/net/ipc.cpp
+++ b/src/net/ipc.cpp
@@ -57,9 +57,7 @@ IPC::~IPC()
}
SDL_DestroyMutex(mMutex);
mMutex = nullptr;
- int status;
- if ((mThread != nullptr) && (SDL_GetThreadID(mThread) != 0u))
- SDL_WaitThread(mThread, &status);
+ SDL::WaitThread(mThread);
mThread = nullptr;
}