mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +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:
@@ -151,10 +151,9 @@ namespace OpenSim.Data.MySQL
|
||||
{
|
||||
if (dbReader.Read())
|
||||
{
|
||||
asset = new AssetBase();
|
||||
asset = new AssetBase(assetID, (string)dbReader["name"], (sbyte)dbReader["assetType"]);
|
||||
asset.Data = (byte[]) dbReader["data"];
|
||||
asset.Description = (string) dbReader["description"];
|
||||
asset.FullID = assetID;
|
||||
|
||||
string local = dbReader["local"].ToString();
|
||||
if (local.Equals("1") || local.Equals("true", StringComparison.InvariantCultureIgnoreCase))
|
||||
@@ -162,8 +161,6 @@ namespace OpenSim.Data.MySQL
|
||||
else
|
||||
asset.Local = false;
|
||||
|
||||
asset.Name = (string) dbReader["name"];
|
||||
asset.Type = (sbyte) dbReader["assetType"];
|
||||
asset.Temporary = Convert.ToBoolean(dbReader["temporary"]);
|
||||
}
|
||||
dbReader.Close();
|
||||
|
||||
Reference in New Issue
Block a user