From f9ba4672d9465c2c521a9edaf7882a0a7bcc4e0d Mon Sep 17 00:00:00 2001 From: Shauren Date: Fri, 29 Dec 2023 00:31:55 +0100 Subject: Core/Database: Fixed a shutdown crash happening if worldserver did not fully start up (for example applying a db update failed) (cherry picked from commit a2be97414bc73448267b52dd1fd6fc997df57b4f) --- src/server/database/Database/DatabaseWorkerPool.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/server/database/Database/DatabaseWorkerPool.cpp b/src/server/database/Database/DatabaseWorkerPool.cpp index 8ae38d7e226..35a1ffb74f9 100644 --- a/src/server/database/Database/DatabaseWorkerPool.cpp +++ b/src/server/database/Database/DatabaseWorkerPool.cpp @@ -167,7 +167,8 @@ void DatabaseWorkerPool::Close() { TC_LOG_INFO("sql.driver", "Closing down DatabasePool '{}'.", GetDatabaseName()); - _ioContext->stop(); + if (_ioContext) + _ioContext->stop(); //! Closes the actualy MySQL connection. _connections[IDX_ASYNC].clear(); -- cgit v1.2.3