summaryrefslogtreecommitdiff
path: root/src/net/download.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/download.cpp')
-rw-r--r--src/net/download.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/net/download.cpp b/src/net/download.cpp
index 769a498b3..54aa8b217 100644
--- a/src/net/download.cpp
+++ b/src/net/download.cpp
@@ -110,9 +110,7 @@ Download::~Download()
mHeaders = nullptr;
}
- int status;
- if ((mThread != nullptr) && (SDL_GetThreadID(mThread) != 0u))
- SDL_WaitThread(mThread, &status);
+ SDL::WaitThread(mThread);
mThread = nullptr;
free(mError);
}
@@ -208,9 +206,7 @@ void Download::cancel()
logger->log("Canceling download: %s", mUrl.c_str());
mOptions.cancel = 1u;
- if ((mThread != nullptr) && (SDL_GetThreadID(mThread) != 0u))
- SDL_WaitThread(mThread, nullptr);
-
+ SDL::WaitThread(mThread);
mThread = nullptr;
}