Don't continue trying to deserialize blank block data
authorkwolekr <kwolekr@minetest.net>
Sun, 24 Nov 2013 07:10:15 +0000 (02:10 -0500)
committerkwolekr <kwolekr@minetest.net>
Sun, 24 Nov 2013 07:10:15 +0000 (02:10 -0500)
src/database-leveldb.cpp
src/database-sqlite3.cpp

index ec28198b5e8984ec8afbfdf5edaceb93f177e474..2a8f59c207996d83d6cea4129b7098ac5ca88bb0 100644 (file)
@@ -104,6 +104,7 @@ MapBlock* Database_LevelDB::loadBlock(v3s16 blockpos)
                } else {
                        throw SerializationError("Blank block data in database");
                }
+               return NULL;
        }
 
        if (s.ok()) {
index 44eb86f543bbf9179a1745e6af5152c1320c17da..38fb2ca1931b62f7c3b37d4573ac761e97f66ea4 100644 (file)
@@ -237,6 +237,7 @@ MapBlock* Database_SQLite3::loadBlock(v3s16 blockpos)
                        } else {
                                throw SerializationError("Blank block data in database");
                        }
+                       return NULL;
                }
 
                std::string datastr(data, len);