let mysql be happy with a NULL heighmap ( yeap i made several )

avinationmerge
UbitUmarov 2015-08-25 12:58:24 +01:00
parent 1c752296bf
commit 50d73873db
1 changed files with 5 additions and 2 deletions

View File

@ -670,6 +670,8 @@ namespace OpenSim.Data.MySQL
while (reader.Read()) while (reader.Read())
{ {
int rev = Convert.ToInt32(reader["Revision"]); int rev = Convert.ToInt32(reader["Revision"]);
if ((reader["Heightfield"] != DBNull.Value))
{
byte[] blob = (byte[])reader["Heightfield"]; byte[] blob = (byte[])reader["Heightfield"];
terrData = TerrainData.CreateFromDatabaseBlobFactory(pSizeX, pSizeY, pSizeZ, rev, blob); terrData = TerrainData.CreateFromDatabaseBlobFactory(pSizeX, pSizeY, pSizeZ, rev, blob);
} }
@ -677,6 +679,7 @@ namespace OpenSim.Data.MySQL
} }
} }
} }
}
return terrData; return terrData;
} }