mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 02:36:00 +08:00
Changing the AssetBase constructors to avoid initializing assets with an unknown asset type, and log an error if it ever does happen
This commit is contained in:
@@ -132,12 +132,13 @@ namespace OpenSim.Data.MSSQL
|
||||
{
|
||||
if (reader.Read())
|
||||
{
|
||||
AssetBase asset = new AssetBase();
|
||||
AssetBase asset = new AssetBase(
|
||||
new UUID((Guid)reader["id"]),
|
||||
(string)reader["name"],
|
||||
Convert.ToSByte(reader["assetType"])
|
||||
);
|
||||
// Region Main
|
||||
asset.FullID = new UUID((Guid)reader["id"]);
|
||||
asset.Name = (string)reader["name"];
|
||||
asset.Description = (string)reader["description"];
|
||||
asset.Type = Convert.ToSByte(reader["assetType"]);
|
||||
asset.Local = Convert.ToBoolean(reader["local"]);
|
||||
asset.Temporary = Convert.ToBoolean(reader["temporary"]);
|
||||
asset.Data = (byte[])reader["data"];
|
||||
|
||||
Reference in New Issue
Block a user