Fixed crash

This commit is contained in:
WolverinDEV 2020-12-16 08:45:10 +01:00
parent 4fddc87866
commit e80afb1145

View File

@ -189,7 +189,7 @@ bool VoiceClient::close_connection(const system_clock::time_point &timeout) {
debugMessage(this->getServerId(), "{} Closing voice client connection. (Flush: {})", CLIENT_STR_LOG_PREFIX, flush);
//TODO: Move this out into a thread pool?
if(this->flushing_thread->joinable()) {
if(this->flushing_thread && this->flushing_thread->joinable()) {
logCritical(LOG_GENERAL, "VoiceClient::close_connection reached flushing thread with an active old handle. Ignoring request.");
return true;
}