-
-
Save Zeno-/b2e9c9f8b183ab38f74a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 9ef136f69ac1e710f8ab866ae311a741c6e9af69 Mon Sep 17 00:00:00 2001 | |
From: Craig Robbins <kde.psych@gmail.com> | |
Date: Thu, 29 Jan 2015 21:14:38 +1000 | |
Subject: [PATCH] Potential bug fixes for local map saving | |
--- | |
src/client.cpp | 8 ++++++-- | |
1 file changed, 6 insertions(+), 2 deletions(-) | |
diff --git a/src/client.cpp b/src/client.cpp | |
index 536e9af..b1a0475 100644 | |
--- a/src/client.cpp | |
+++ b/src/client.cpp | |
@@ -295,7 +295,6 @@ void * MeshUpdateThread::Thread() | |
if (!gamespec.isValid()) | |
gamespec = findSubgame("minimal"); | |
} else { | |
- std::string world_gameid = getWorldGameId(world_path, false); | |
gamespec = findWorldSubgame(world_path); | |
} | |
if (!gamespec.isValid()) { | |
@@ -308,6 +307,7 @@ void * MeshUpdateThread::Thread() | |
localdb->beginSave(); | |
actionstream << "Local map saving started, map will be saved at '" << world_path << "'" << std::endl; | |
} else { | |
+ localserver = NULL; | |
localdb = NULL; | |
} | |
@@ -318,10 +318,14 @@ void Client::Stop() | |
{ | |
//request all client managed threads to stop | |
m_mesh_update_thread.Stop(); | |
- if (localdb != NULL) { | |
+ if (localdb) { | |
actionstream << "Local map saving ended" << std::endl; | |
localdb->endSave(); | |
} | |
+ if (localserver) { | |
+ actionstream << "Local server for map saving ended" << std::endl; | |
+ delete localserver; | |
+ } | |
} | |
bool Client::isShutdown() | |
-- | |
1.9.3 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment