add check for item typ

master
Christopher 2020-07-10 17:14:16 +02:00
parent a8e544765e
commit 49cb60bd8a
1 changed files with 7 additions and 1 deletions

View File

@ -80,7 +80,13 @@ namespace OpenSim.Modules.Appearance2Avatar
if(notecardItem != null)
{
//GetNotecardData
if(notecardItem.Type != 7)
{
m_log.Error("[" + Name + "] ERROR: Given item is not a notecard");
throw new Exception("Given item is not a notecard.");
return;
}
AssetBase asset = m_scene.AssetService.Get(notecardItem.AssetID.ToString());
if(asset != null)