diff options
-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 */ |