mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 14:16:07 +08:00
Some unit tests are simply broken and create an API with a null m_item.
This isn't supposed to be done and should be changed in the tests. For now, add a protective check.
This commit is contained in:
@@ -403,6 +403,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
protected virtual void Sleep(int delay)
|
||||
{
|
||||
if (m_item == null) // Some unit tests don't set this
|
||||
{
|
||||
Thread.Sleep(delay);
|
||||
return;
|
||||
}
|
||||
|
||||
m_ScriptEngine.SleepScript(m_item.ItemID, delay);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user