Avoid an invalid cast on legacy data

0.6.3-post-fixes
Melanie Thielker 2009-01-18 23:31:13 +00:00
parent 63d2885008
commit c5395feadd
1 changed files with 8 additions and 1 deletions

View File

@ -142,7 +142,14 @@ namespace OpenSim.Data.MySQL
asset.Data = (byte[]) dbReader["data"];
asset.Description = (string) dbReader["description"];
asset.FullID = assetID;
try
{
asset.Local = (bool)dbReader["local"];
}
catch (System.InvalidCastException)
{
asset.Local = false;
}
asset.Name = (string) dbReader["name"];
asset.Type = (sbyte) dbReader["assetType"];
}