File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -100,8 +100,7 @@ MapBlock* Database_LevelDB::loadBlock(v3s16 blockpos)
100
100
std::string datastr;
101
101
leveldb::Status status = m_database->Get (leveldb::ReadOptions (),
102
102
i64tos (getBlockAsInteger (blockpos)), &datastr);
103
- ENSURE_STATUS_OK (status);
104
- if (datastr.length () == 0 ) {
103
+ if (datastr.length () == 0 && status.ok ()) {
105
104
errorstream << " Blank block data in database (datastr.length() == 0) ("
106
105
<< blockpos.X << " ," << blockpos.Y << " ," << blockpos.Z << " )" << std::endl;
107
106
@@ -112,7 +111,8 @@ MapBlock* Database_LevelDB::loadBlock(v3s16 blockpos)
112
111
throw SerializationError (" Blank block data in database" );
113
112
}
114
113
return NULL ;
115
- } else {
114
+ }
115
+ if (status.ok ()) {
116
116
/*
117
117
Make sure sector is loaded
118
118
*/
You can’t perform that action at this time.
0 commit comments