diff --git a/dChatServer/ChatServer.cpp b/dChatServer/ChatServer.cpp index 34b4d6e3..13f2bde0 100644 --- a/dChatServer/ChatServer.cpp +++ b/dChatServer/ChatServer.cpp @@ -202,8 +202,11 @@ int main(int argc, char** argv) { //Delete our objects here: Database::Destroy("ChatServer"); delete Game::server; + Game::server = nullptr; delete Game::logger; + Game::logger = nullptr; delete Game::config; + Game::config = nullptr; return EXIT_SUCCESS; } diff --git a/dWeb/Web.cpp b/dWeb/Web.cpp index abf9bd36..f8cf2edf 100644 --- a/dWeb/Web.cpp +++ b/dWeb/Web.cpp @@ -184,7 +184,7 @@ static void DLOG(char ch, void *param) { static size_t len{}; if (ch != '\n') buf[len++] = ch; // we provide the newline in our logger if (ch == '\n' || len >= sizeof(buf)) { - LOG_DEBUG("%.*s", static_cast(len), buf); + if (Game::logger) LOG_DEBUG("%.*s", static_cast(len), buf); len = 0; } }