summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-11-30 19:38:52 +0100
committerHowaner <franzi.moos@googlemail.com>2014-11-30 19:38:52 +0100
commit6adf749164d7bc98bf34173b1f9d64804913d734 (patch)
treee15bd9dd8512fdbb61736db4d2d0b1f218bb81f0 /src/World.cpp
parentRemoved old MobType category. (diff)
parentHopefully fixed random build fails (diff)
downloadcuberite-6adf749164d7bc98bf34173b1f9d64804913d734.tar
cuberite-6adf749164d7bc98bf34173b1f9d64804913d734.tar.gz
cuberite-6adf749164d7bc98bf34173b1f9d64804913d734.tar.bz2
cuberite-6adf749164d7bc98bf34173b1f9d64804913d734.tar.lz
cuberite-6adf749164d7bc98bf34173b1f9d64804913d734.tar.xz
cuberite-6adf749164d7bc98bf34173b1f9d64804913d734.tar.zst
cuberite-6adf749164d7bc98bf34173b1f9d64804913d734.zip
Diffstat (limited to 'src/World.cpp')
-rw-r--r--src/World.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/World.cpp b/src/World.cpp
index 0dec0bd96..5fe64ea3a 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -164,6 +164,8 @@ protected:
if (m_NumPrepared >= m_MaxIdx)
{
m_EvtFinished.Set();
+ // Must return here, because "this" may have gotten deleted by the previous line
+ return;
}
// Queue another chunk, if appropriate:
@@ -2678,7 +2680,7 @@ bool cWorld::ForEachPlayer(cPlayerListCallback & a_Callback)
bool cWorld::DoWithPlayer(const AString & a_PlayerName, cPlayerListCallback & a_Callback)
{
- // Calls the callback for each player in the list
+ // Calls the callback for the specified player in the list
cCSLock Lock(m_CSPlayers);
for (cPlayerList::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
{