diff options
author | sapier <Sapier at GMX dot net> | 2014-07-07 00:06:06 +0200 |
---|---|---|
committer | sapier <Sapier at GMX dot net> | 2014-07-07 00:06:06 +0200 |
commit | e14c4cdd4c3c9b554dc9cb91f8f29078ad337ded (patch) | |
tree | fecc48dfd2cc8ff19ca7dc59a2f1298b472b052f /src/database-leveldb.cpp | |
parent | 96f285f71e75b5ff80357b994e3284adc163d5e5 (diff) | |
download | minetest-e14c4cdd4c3c9b554dc9cb91f8f29078ad337ded.tar.gz minetest-e14c4cdd4c3c9b554dc9cb91f8f29078ad337ded.tar.bz2 minetest-e14c4cdd4c3c9b554dc9cb91f8f29078ad337ded.zip |
Fix regression in leveldb backend
Diffstat (limited to 'src/database-leveldb.cpp')
-rw-r--r-- | src/database-leveldb.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/database-leveldb.cpp b/src/database-leveldb.cpp index 1b201fc1a..9fe47b34e 100644 --- a/src/database-leveldb.cpp +++ b/src/database-leveldb.cpp @@ -100,8 +100,7 @@ MapBlock* Database_LevelDB::loadBlock(v3s16 blockpos) std::string datastr; leveldb::Status status = m_database->Get(leveldb::ReadOptions(), i64tos(getBlockAsInteger(blockpos)), &datastr); - ENSURE_STATUS_OK(status); - if (datastr.length() == 0) { + if (datastr.length() == 0 && status.ok()) { errorstream << "Blank block data in database (datastr.length() == 0) (" << blockpos.X << "," << blockpos.Y << "," << blockpos.Z << ")" << std::endl; @@ -112,7 +111,8 @@ MapBlock* Database_LevelDB::loadBlock(v3s16 blockpos) throw SerializationError("Blank block data in database"); } return NULL; - } else { + } + if (status.ok()) { /* Make sure sector is loaded */ |