summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-09-06 15:26:20 +0200
committerMattes D <github@xoft.cz>2014-09-06 15:26:20 +0200
commit9e1f67932b32241312f25279d924c235d4cff66d (patch)
tree0bbe993ee9f092092bd98e12825872a57c554831
parentWin build: put third party licenses into a separate folder. (diff)
downloadcuberite-9e1f67932b32241312f25279d924c235d4cff66d.tar
cuberite-9e1f67932b32241312f25279d924c235d4cff66d.tar.gz
cuberite-9e1f67932b32241312f25279d924c235d4cff66d.tar.bz2
cuberite-9e1f67932b32241312f25279d924c235d4cff66d.tar.lz
cuberite-9e1f67932b32241312f25279d924c235d4cff66d.tar.xz
cuberite-9e1f67932b32241312f25279d924c235d4cff66d.tar.zst
cuberite-9e1f67932b32241312f25279d924c235d4cff66d.zip
-rw-r--r--src/Entities/Player.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 51a1f8699..b0da6965a 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -1671,6 +1671,10 @@ bool cPlayer::LoadFromFile(const AString & a_FileName, cWorldPtr & a_World)
m_LoadedWorldName = root.get("world", "world").asString();
a_World = cRoot::Get()->GetWorld(GetLoadedWorldName(), false);
+ if (a_World == NULL)
+ {
+ a_World = cRoot::Get()->GetDefaultWorld();
+ }
m_LastBedPos.x = root.get("SpawnX", a_World->GetSpawnX()).asInt();
m_LastBedPos.y = root.get("SpawnY", a_World->GetSpawnY()).asInt();