From 080002f8ed1af6d34cdc6f5abff0f51586ca831c Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Fri, 14 Oct 2011 12:39:25 +0300 Subject: [PATCH] Lock mutex when accessing m_env in Server::~Server --- src/server.cpp | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/server.cpp b/src/server.cpp index 73df81dde..5b9903f5a 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -1139,19 +1139,23 @@ Server::~Server() {} } } + + { + JMutexAutoLock envlock(m_env_mutex); - /* - Save players - */ - dstream<<"Server: Saving players"<