avoid potencial NullReferenceException

avinationmerge
UbitUmarov 2012-11-24 03:39:37 +00:00
parent edb3a9596b
commit f254af29ac
1 changed files with 5 additions and 2 deletions

View File

@ -317,8 +317,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
comms.DeleteListener(itemID); comms.DeleteListener(itemID);
IXMLRPC xmlrpc = engine.World.RequestModuleInterface<IXMLRPC>(); IXMLRPC xmlrpc = engine.World.RequestModuleInterface<IXMLRPC>();
xmlrpc.DeleteChannels(itemID); if (xmlrpc != null)
xmlrpc.CancelSRDRequests(itemID); {
xmlrpc.DeleteChannels(itemID);
xmlrpc.CancelSRDRequests(itemID);
}
// Remove Sensors // Remove Sensors
m_SensorRepeat[engine].UnSetSenseRepeaterEvents(localID, itemID); m_SensorRepeat[engine].UnSetSenseRepeaterEvents(localID, itemID);