Created
July 6, 2014 21:40
-
-
Save sapier/3e91c0ce6c23e8e134b6 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
diff --git a/src/database-leveldb.cpp b/src/database-leveldb.cpp | |
index 1b201fc..9fe47b3 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 | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment