diff --git a/code/Common/Assimp.cpp b/code/Common/Assimp.cpp index 91896e405..22e16bd36 100644 --- a/code/Common/Assimp.cpp +++ b/code/Common/Assimp.cpp @@ -416,6 +416,10 @@ ASSIMP_API aiReturn aiDetachLogStream(const aiLogStream *stream) { DefaultLogger::get()->detachStream(it->second); delete it->second; + if ((Assimp::LogStream *)stream->user == DefaultStream) { + DefaultStream = nullptr; + } + gActiveLogStreams.erase(it); if (gActiveLogStreams.empty()) {